mirror of
https://github.com/wahyd4/you-music.git
synced 2026-08-09 05:06:44 +10:00
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: you_music
|
|
POSTGRES_USER: youmusic
|
|
POSTGRES_PASSWORD: youmusic_dev_password
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U youmusic -d you_music"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
youmusic:
|
|
build: .
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- ./data:/app/data
|
|
- /Users/junv/Music/网易云音乐:/app/data/local-music
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
- PYTHONPATH=/app/backend
|
|
# Database configuration - PostgreSQL
|
|
- DB_TYPE=postgres
|
|
- DB_POSTGRES_HOST=postgres
|
|
- DB_POSTGRES_PORT=5432
|
|
- DB_POSTGRES_DATABASE=you_music
|
|
- DB_POSTGRES_USER=youmusic
|
|
- DB_POSTGRES_PASSWORD=youmusic_dev_password
|
|
# App directories
|
|
- MUSIC_DIR=/app/data/music
|
|
- LOCAL_MUSIC_DIR=/app/data/local-music
|
|
- UPLOAD_DIR=/app/data/uploads
|
|
- TEMP_DIR=/app/data/temp
|
|
- BASE_DIR=/app
|
|
- FFMPEG_LOCATION=ffmpeg
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
volumes:
|
|
postgres-data:
|