Skip to content

Commit

Permalink
modify docker compose with env_file
Browse files Browse the repository at this point in the history
  • Loading branch information
soaibsafi committed Nov 9, 2023
1 parent 9f9ad7f commit 2d1e338
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
flask_env = os.getenv('FLASK_ENV')
class Config:
DEBUG = True
print(f"FLASK_ENV: {flask_env}")
SQLALCHEMY_DATABASE_URI = "postgresql://postgres:postgres@localhost:5432/postgres"
if flask_env == 'production':
DEBUG = False
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ services:
- "8000:8000"
networks:
- my_network
env_file:
- .env
restart: unless-stopped

postgres:
Expand All @@ -42,6 +44,8 @@ services:
interval: 5s
timeout: 5s
retries: 5
env_file:
- .env
networks:
- my_network

Expand Down

0 comments on commit 2d1e338

Please sign in to comment.