From 2b6c631d64b07554f64ead5c6b57b9c46e876202 Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Tue, 3 Sep 2024 16:42:25 -0400 Subject: [PATCH] fix(compose): adjust `.env` inject --- docker-compose.yaml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 1156be7..4def68e 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,9 +3,9 @@ services: db: image: 'docker.io/library/postgres:16' environment: - POSTGRES_DATABASE: "${BOTTIN_SERVER_API_DB_DATABASE}" - POSTGRES_PASSWORD: "${BOTTIN_SERVER_API_DB_PASSWORD}" - POSTGRES_USER: "${BOTTIN_SERVER_API_DB_USER}" + POSTGRES_DATABASE: "${BOTTIN_SERVER_API_DB_DATABASE:-bottin}" + POSTGRES_PASSWORD: "${BOTTIN_SERVER_API_DB_PASSWORD:-bottin}" + POSTGRES_USER: "${BOTTIN_SERVER_API_DB_USER:-bottin}" volumes: - 'db-data:/var/lib/postgresql/data' restart: 'unless-stopped' @@ -15,7 +15,13 @@ services: - db build: . image: 'git.agecem.com/agecem/bottin:latest' - env_file: '.env' + env: + BOTTIN_SERVER_API_DB_DATABASE: "${BOTTIN_SERVER_API_DB_DATABASE:-bottin}" + BOTTIN_SERVER_API_DB_HOST: "${BOTTIN_SERVER_API_DB_HOST:-db}" + BOTTIN_SERVER_API_DB_PASSWORD: "${BOTTIN_SERVER_API_DB_PASSWORD:-bottin}" + BOTTIN_SERVER_API_DB_USER: "${BOTTIN_SERVER_API_DB_USER:-bottin}" + #BOTTIN_SERVER_API_HOST: "${BOTTIN_SERVER_API_HOST:}" + #BOTTIN_SERVER_API_KEY: "${BOTTIN_SERVER_API_KEY ports: - '1312:1312' volumes: @@ -28,7 +34,9 @@ services: - api build: . image: 'git.agecem.com/agecem/bottin:latest' - env_file: '.env' + env: + BOTTIN_WEB_PASSWORD: "${BOTTIN_WEB_PASSWORD:-bottin}" + BOTTIN_WEB_USER: "${BOTTIN_WEB_USER:-bottin}" ports: - '2312:2312' volumes: