Lumen Example

This is a lumen sample app with docker and kubernetes config to run in the keks.cloud. It can be used to create small webguis or even better api endpoints. It contains the following content:

  • Lumen Project
  • Config for Lumen queues
  • Docker container
  • Docker-compose config
  • Kubernetes config

I use this script that i can create a web or api prototyp without caring about the basic config each time.

What about crons?

Use Kubernetes Crons.

What about queues?

The Project setup is based on the mysql queue driver. The migrations will be execute while the start of the docker container.

Where is the docker config?

The docker config is in the /resources/docker folder, it contains the Dockerfiles and all needet files to run the project in docker with docker-compose.

Build app

To run the app in kubernetes you need to build the docker container. Therefor is a script in the resources/build folder. Before you first start the script change the name of the tag to your projectname, replace the sampleapp. Go in this folder and execute the script to build the container and push them to docker.keks.cloud.

Run the App in Kubernetes?

The App contains information to run it on kubernetes. All needet config files are in the resources/kubernetes folder. If you want to run the app in kubernetes you want to change the url and the enivoment files.

You need to change the Namespace name, in this app it is always "sampleapp" you can search it in the kubernetes folder and need to replace it in each file.

MYSQL

If you want to run a MYSQL-Server in Kubernetes (just do it if it a prototyp) you need to change and deploy the config-mysql.yml, deployment-mysql.yml and service-mysql.yml

To save the information you need a persistent volume called mysql, or you disabled it in the deplyoment-mysql.yml

If you run the MYSQL-Server in the keks.cloud you can add the config-mysql-backup.yml and cron-mysql-backup.yml to enabled the backup to s3

Download / Git

You can get the Project from its git.keks.cloud project or download the last version as ZIP or TAR.GZ.