Repository navigation
Ship the application as two production Docker images - #95
Merged
Merged
Conversation
* "php" (php-fpm on a unix socket, code and vendors baked in, APP_ENV=prod, also the CLI image) and "nginx" images, built from the new production stages of the Dockerfile, running as non-root users * php-fpm and nginx configuration shared between the dev frontend container and the production images * "prod" castor context to build, run and push the images on a dedicated compose stack * castor docker:push --tag also pushes the images * "Build and push production images" workflow, on every push to main and every tag
Symfony calls the autocomplete callback with a CompletionInput, which get_service_names() received as the profile name: no service matched, so nothing was ever suggested.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same as jolicode/qotd#106: the application now ships as two self-contained Docker images. The CI builds them and pushes them to GHCR on every push to
mainand on every tag:php: php-fpm listening on the unix socket/var/run/php/php-fpm.sock, with the code and the vendors baked in,APP_ENV=prod. The same image is used for CLI commands (bin/console), e.g. the migrations.nginx: the official nginx image with thepublic/directory and the site configuration, forwarding PHP requests to that socket.Both run as non-root users. Everything else (secrets, database, Slack credentials, dashboard password) is provided through environment variables at runtime.
Other changes:
frontendcontainer and the production images now share the same php-fpm and nginx configuration (services/php/php/,services/php/nginx/); the production-only settings are inservices/php/php/mods-available/app-prod.ini. The dev php-fpm listens on the same unix socket, and the dev container listens on port 8080;prodcastor context now runs the usual tasks on a dedicated compose stack, to test the images locally:castor build -c prod,castor start -c prod,castor destroy -c prod(see the README). It replaces the previousprodcontext, which pointed to the real domain;castor docker:push --tag=...now pushes the images too, not just the build cache. The new "Build and push production images" workflow uses it. Images are tagged with the short commit sha,latestonmain, and the git tag when there is one.Differences with qotd: no asset-mapper, uploads volume or cron (monologue doesn't use them).
--tagis simpler becausedocker:pushnow runsbuildx bakedirectly on the compose files (#93). I also added hadolint ignores forCOPY --from=app, becauseappis a build context and not a stage.