2025-10-29 21:16:09 -04:00
|
|
|
---
|
2025-10-18 09:14:10 -04:00
|
|
|
services:
|
|
|
|
|
database:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_DB: plex_playlist
|
|
|
|
|
POSTGRES_USER: plex_user
|
|
|
|
|
POSTGRES_PASSWORD: plex_password
|
|
|
|
|
volumes:
|
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U plex_user -d plex_playlist"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
|
|
|
|
|
backend:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile.backend
|
|
|
|
|
environment:
|
2025-10-29 21:16:09 -04:00
|
|
|
DATABASE_URL: >-
|
|
|
|
|
postgresql://plex_user:plex_password@database:5432/plex_playlist
|
2025-10-18 09:14:10 -04:00
|
|
|
ENVIRONMENT: production
|
|
|
|
|
ports:
|
|
|
|
|
- "8000:8000"
|
|
|
|
|
depends_on:
|
|
|
|
|
database:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile.frontend
|
|
|
|
|
target: production
|
|
|
|
|
ports:
|
|
|
|
|
- "80:80"
|
|
|
|
|
depends_on:
|
|
|
|
|
- backend
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
postgres_data:
|