Hi.
I have deployed a YII2 app based on the advanced template. Now I want to deploy multiple instances of the app using Docker.
Every single Docker deployment set up that I saw has 3 containers: nginx, php-fpm and database. nginx and php containers share the same volume where the yii2 app is stored, but I don’t like this for production, this means that i have to copy that folder for every deployed instance plus i have to manage the updates of the vendor folder. And this leads to a git pull, yii migrate, and composer update commands to keep everything up to date. What i want is to pull an app image and database image, pass custom parameters as dabatase setup, domain name, cookieKey, etc… and spin up the instance.
I managed to make one container which runs niginx and php-fpm (managed by supervisord) with the yii2 code inside and the composer installs all the dependencies during container build. And I like that i can just pull the image and get it up and running in seconds, but using the supervisord just does not seems to be right, it breaks Docker philosophy of 1 process = 1 container.
Is my approach using supervisord really bad? Are there any better alternatves? How are you deploying your yii2 projects?
Thanks in advance