diff --git a/docs/production.md b/docs/production.md index 13a4b35..4b4882e 100644 --- a/docs/production.md +++ b/docs/production.md @@ -85,3 +85,18 @@ docker compose -f compose.yaml -f compose.prod.yaml up -d --wait If you want to deploy your app on a cluster of machines, you can use [Docker Swarm](https://docs.docker.com/engine/swarm/stack-deploy/), which is compatible with the provided Compose files. To deploy on Kubernetes, take a look at [the Helm chart provided with API Platform](https://api-platform.com/docs/deployment/kubernetes/), which can be easily adapted for use with Symfony Docker. + +## Passing local environment variables to containers + +By default, `.env.local` and `.env.*.local` files are excluded from production images. +If you want to pass them to your containers, you can use the [`env_file` attribute](https://docs.docker.com/compose/environment-variables/set-environment-variables/#use-the-env_file-attribute): + +```yaml +# compose.prod.yml + +services: + php: + env_file: + - .env.prod.local + # ... +```