44
compose.yml
Normal file
44
compose.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
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:
|
||||
DATABASE_URL: postgresql://plex_user:plex_password@database:5432/plex_playlist
|
||||
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:
|
||||
Reference in New Issue
Block a user