From 6685278aaad62ec2bb79c36b16cb2c8c0f2e9aa7 Mon Sep 17 00:00:00 2001 From: Mohammad Ferry Husnil Arif Date: Sun, 2 Jun 2024 16:12:14 +0700 Subject: [PATCH] fix: change environment inside docker compose --- docker-compose.prod.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docker-compose.prod.yaml b/docker-compose.prod.yaml index 3eed632..7b255bc 100644 --- a/docker-compose.prod.yaml +++ b/docker-compose.prod.yaml @@ -8,6 +8,15 @@ services: command: gunicorn ce_tour.wsgi:application --bind 0.0.0.0:8000 volumes: - static_volume:/home/app/web/staticfiles + environment: + - SECRET_KEY=${SECRET_KEY} + - SQL_ENGINE=${SQL_ENGINE} + - SQL_DATABASE=${SQL_DATABASE} + - SQL_USER=${SQL_USER} + - SQL_PASSWORD=${SQL_PASSWORD} + - SQL_HOST=${SQL_HOST} + - SQL_PORT=${SQL_PORT} + - DATABASE=${DATABASE} expose: - 8000 depends_on: @@ -16,6 +25,10 @@ services: image: postgres:15 volumes: - postgres_data:/var/lib/postgresql/data/ + environment: + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_DB=${POSTGRES_DB} nginx: image: nginx restart: unless-stopped