From 5fa4611d8d935fa6d7d6c878bb6b15f51a8955a4 Mon Sep 17 00:00:00 2001 From: Hunter Paulson Date: Tue, 10 Feb 2026 20:15:09 -0500 Subject: [PATCH] docs: Adds warning for .env injection in docker-compose --- .../content/docs/core/docker-compose/index.mdx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/docs/content/docs/core/docker-compose/index.mdx b/apps/docs/content/docs/core/docker-compose/index.mdx index 34f3a34..10b72c9 100644 --- a/apps/docs/content/docs/core/docker-compose/index.mdx +++ b/apps/docs/content/docs/core/docker-compose/index.mdx @@ -18,9 +18,20 @@ Dokploy provides two methods for creating Docker Compose configurations: Configure the source of your code, the way your application is built, and also manage actions like deploying, updating, and deleting your application, and stopping it. -### Enviroment +### Environment -A code editor within Dokploy allows you to specify environment variables for your Docker Compose file. By default, Dokploy creates a `.env` file in the specified Docker Compose file path. +The code editor in Dokploy allows you to define environment variables for your Docker Compose deployment. By default, Dokploy saves these variables to a `.env` file in the same directory as your `docker-compose.yml`. + + +Environment variables set in the UI are written to the `.env` file, but are **not automatically injected into containers**. To pass variables into a service, use the `env_file` option in your `docker-compose.yml`: + +```yaml +services: + app: + env_file: + - .env +``` + ### Monitoring