Add .env file support to docker-compose configurations
Added the `env_file` directive to both `docker-compose.yml` and `docker-compose.dev.yml` to load environment variables from a `.env` file. This ensures consistent environment variable management across different configurations.
This commit is contained in:
@@ -21,6 +21,8 @@ services:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
target: production
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- DATABASE_URL=${DATABASE_URL}
|
||||
- SECRET_KEY=${SECRET_KEY}
|
||||
|
||||
Reference in New Issue
Block a user