An eight-part series following the migration of a Symfony microservices platform from Docker Compose to Kubernetes, through the lens of the twelve-factor methodology. Each article isolates one category of problem — storage, secrets, logs, service dependencies, CI environment parity, distributed cache, readiness probes, schema governance — and reads it against the twelve-factor principles that apply.
Eleven Out of Twelve
The composer.json in each service had this in its post-install-cmd section: "post-install-cmd": [ "bin/console cache:clear --env=prod", "bin/console doctrine:migrations:migrate --no-interaction" ] post-install-cmd runs during composer install, which in the production Dockerfile runs during the image build. There is no database available during a Docker build. The migration command either failed silently, or connected to nothing, or was skipped by Doctrine when it couldn’t find a schema to compare against. In any case, it didn’t migrate anything. ...