From 9fc0aaa2cd01c96d613b2b07d24710d7d14c71fc Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 3 Feb 2021 06:25:07 +0300 Subject: [PATCH] use TTRSS_DB_* variables instead of POSTGRES_* to set database configuration --- .env-dist | 5 +++-- docker-compose.yml | 18 ++++-------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.env-dist b/.env-dist index 3fc6a75..e124c29 100644 --- a/.env-dist +++ b/.env-dist @@ -1,8 +1,9 @@ # Copy this file to .env before building the container. # Put any local modifications here. -POSTGRES_USER=postgres -POSTGRES_PASSWORD=password +TTRSS_DB_USER=postgres +TTRSS_DB_NAME=postgres +TTRSS_DB_PASS=password # This is only used by web-ssl container. #HTTP_HOST=localhost diff --git a/docker-compose.yml b/docker-compose.yml index 6ba346f..8a9b026 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,8 +4,10 @@ services: db: image: postgres:12-alpine restart: unless-stopped - env_file: - - .env + environment: + - POSTGRES_USER=${TTRSS_DB_USER} + - POSTGRES_PASSWORD=${TTRSS_DB_PASS} + - POSTGRES_DB=${TTRSS_DB_NAME} volumes: - db:/var/lib/postgresql/data @@ -14,10 +16,6 @@ services: restart: unless-stopped env_file: - .env - environment: - - TTRSS_DB_NAME=${POSTGRES_USER} - - TTRSS_DB_USER=${POSTGRES_USER} - - TTRSS_DB_PASS=${POSTGRES_PASSWORD} volumes: - app:/var/www/html - ./config.d:/opt/tt-rss/config.d:ro @@ -27,10 +25,6 @@ services: backups: image: cthulhoo/ttrss-fpm-pgsql-static restart: unless-stopped - environment: - - TTRSS_DB_NAME=${POSTGRES_USER} - - TTRSS_DB_USER=${POSTGRES_USER} - - TTRSS_DB_PASS=${POSTGRES_PASSWORD} volumes: - backups:/backups - app:/var/www/html @@ -43,10 +37,6 @@ services: restart: unless-stopped env_file: - .env - environment: - - TTRSS_DB_NAME=${POSTGRES_USER} - - TTRSS_DB_USER=${POSTGRES_USER} - - TTRSS_DB_PASS=${POSTGRES_PASSWORD} volumes: - app:/var/www/html - ./config.d:/opt/tt-rss/config.d:ro