From 70b0f4152a2cc62dbecf28f98ea364b8ef66129d Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Mon, 16 Sep 2024 15:01:32 -0400 Subject: [PATCH] fix: noms de flags pour infos DB et inject .env dans containers --- README.md | 6 +++--- docker-compose.yaml | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9df143d..657eca4 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ Nécessite une installation fonctionnelle et accessible de [agecem/bottin](https Remplir .env avec données d'environnement: ``` -BOTTINAGENDA_POSTGRES_DATABASE=bottin-agenda -BOTTINAGENDA_POSTGRES_PASSWORD=bottin-agenda -BOTTINAGENDA_POSTGRES_USER=bottin-agenda +BOTTINAGENDA_DB_DATABASE=bottin-agenda +BOTTINAGENDA_DB_PASSWORD=bottin-agenda +BOTTINAGENDA_DB_USER=bottin-agenda ``` Déployer avec docker-compose: diff --git a/docker-compose.yaml b/docker-compose.yaml index f1f7c4f..ad4380e 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,9 +3,9 @@ services: db: image: 'docker.io/library/postgres:16.1' environment: - POSTGRES_DATABASE: "${BOTTINAGENDA_POSTGRES_DATABASE}" - POSTGRES_PASSWORD: "${BOTTINAGENDA_POSTGRES_PASSWORD}" - POSTGRES_USER: "${BOTTINAGENDA_POSTGRES_USER}" + POSTGRES_DATABASE: "${BOTTINAGENDA_DB_DATABASE:?}" + POSTGRES_PASSWORD: "${BOTTINAGENDA_DB_PASSWORD:?}" + POSTGRES_USER: "${BOTTINAGENDA_DB_USER:?}" volumes: - 'db-data:/var/lib/postgresql/data' restart: 'unless-stopped' @@ -14,6 +14,7 @@ services: depends_on: - db build: . + env_file: '.env' image: 'git.agecem.com/agecem/bottin-agenda:latest' ports: - '1313:1313' @@ -26,6 +27,7 @@ services: depends_on: - api build: . + env_file: '.env' image: 'git.agecem.com/agecem/bottin-agenda:latest' ports: - '2313:2313'