Use Kubernetes Crons.
The Project setup is based on the mysql queue driver. The migrations will be execute while the start of the docker container.
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.
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.
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.
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
You can get the Project from its git.keks.cloud project or download the last version as ZIP or TAR.GZ.