Store configuration separately from your service definitions. Update values without changing your composition.
Add variables as Config (visible) or Secret (encrypted). Reference them in your composition using ${VAR_NAME}.
Manage environment variables for your services
| Key | Value | Type | |
|---|---|---|---|
| API_URL | https://api.example.com | Config | |
| LOG_LEVEL | debug | Config | |
| DB_PASSWORD | •••••••• | Secret | |
| JWT_SECRET | •••••••• | Secret |
Upload configuration files to mount into containers. Reference them using the /files/ prefix.
Upload configuration files to mount into containers
| File Name | |
|---|---|
| nginx.conf | |
| app-settings.json |
services:
api:
image: myapp/api
environment:
DATABASE_URL: ${DATABASE_URL}
JWT_SECRET: ${JWT_SECRET}
nginx:
image: nginx:alpine
volumes:
- /files/nginx.conf:/etc/nginx/nginx.confVariables
${VAR_NAME}Files
/files/name:/path