Skip to content

Commit

Permalink
Django settings DB_PORT fallback 5432
Browse files Browse the repository at this point in the history
  • Loading branch information
cxrxixs committed May 11, 2024
1 parent 4448f0a commit 0d35685
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
postgres:
image: postgres
ports:
- 5439:5439
- 5432:5432
env:
POSTGRES_DB: db_test
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 5439
POSTGRES_PORT: 5432
# set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
Expand Down
2 changes: 1 addition & 1 deletion core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"POSTGRES_PASSWORD"
)
DB_HOST = os.environ.get("DB_HOST") or "localhost"
DB_PORT = os.environ.get("DB_PORT") or os.environ.get("POSTGRES_PORT")
DB_PORT = os.environ.get("DB_PORT") or "5432"
REDIS_HOST = os.environ.get("REDIS_HOST")
REDIS_PORT = os.environ.get("REDIS_PORT")

Expand Down

0 comments on commit 0d35685

Please sign in to comment.