feat: migrate database environment configuration from db.env to inline environment variables in nextcloud.yml

This commit is contained in:
2025-07-01 18:45:04 +08:00
parent 556d94bcb0
commit 7ec7902a79
2 changed files with 9 additions and 6 deletions
View File
+9 -6
View File
@@ -7,8 +7,10 @@ services:
restart: always restart: always
volumes: volumes:
- db:/var/lib/postgresql/data:Z - db:/var/lib/postgresql/data:Z
env_file: environment:
- db.env POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
networks: networks:
- nextcloud-net - nextcloud-net
@@ -27,10 +29,11 @@ services:
- nextcloud:/var/www/html:z - nextcloud:/var/www/html:z
# NOTE: The `volumes` config of the `cron` and `app` containers must match # NOTE: The `volumes` config of the `cron` and `app` containers must match
environment: environment:
- POSTGRES_HOST=db POSTGRES_HOST: db
- REDIS_HOST=redis REDIS_HOST: redis
env_file: POSTGRES_DB: ${POSTGRES_DB}
- db.env POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
networks: networks:
- nextcloud-net - nextcloud-net
depends_on: depends_on: