Skip to content

Commit 86312e7

Browse files
author
Rafael
committed
Fix PostgreSQL healthcheck user in docker-compose.yml and standardize database configuration in config.py
1 parent 6f4c0a4 commit 86312e7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
class Settings(BaseSettings):
88
POSTGRES_HOSTNAME: str
9-
POSTGRES_USER: str
10-
POSTGRES_PASSWORD: str
11-
POSTGRES_DB: str
12-
DATABASE_PORT: int
9+
POSTGRES_USER: str = "postgres"
10+
POSTGRES_PASSWORD: str = "password"
11+
POSTGRES_DB: str = "fastapi"
12+
DATABASE_PORT: int = 5432
1313
API_KEY: str
1414

1515
class Config:

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ services:
1414
volumes:
1515
- postgres_data:/var/lib/postgresql/data
1616
healthcheck:
17-
test: ["CMD-SHELL", "pg_isready -U user"]
17+
test: ["CMD-SHELL", "pg_isready -U postgres"]
1818
interval: 10s
1919
timeout: 5s
2020
retries: 5

0 commit comments

Comments
 (0)