Step 2 migration: add PostgreSQL schema and read endpoints

This commit is contained in:
Ponte
2026-02-11 14:57:36 +01:00
parent aae5471862
commit 89d9275e1a
6 changed files with 203 additions and 11 deletions

View File

@@ -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