Step 2 migration: add PostgreSQL schema and read endpoints
This commit is contained in:
@@ -7,6 +7,11 @@ services:
|
||||
- POSTGRES_DB=${VG_DB_NAME:-video_games}
|
||||
- POSTGRES_USER=${VG_DB_USER:-video_games_user}
|
||||
- POSTGRES_PASSWORD=${VG_DB_PASSWORD:-change_me}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${VG_DB_USER:-video_games_user} -d ${VG_DB_NAME:-video_games}"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
volumes:
|
||||
- video_games_data:/var/lib/postgresql/data
|
||||
|
||||
@@ -17,7 +22,8 @@ services:
|
||||
container_name: video-games-api
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- video-games-db
|
||||
video-games-db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- SERVICE_NAME=video-games-api
|
||||
- API_INTERNAL_PORT=3001
|
||||
|
||||
Reference in New Issue
Block a user