version: "3.9" services: backend-girlfriend: build: context: ./server environment: # Spotify API Configuration - SPOTIFY_CLIENT_ID=${SPOTIFY_CLIENT_ID} - SPOTIFY_CLIENT_SECRET=${SPOTIFY_CLIENT_SECRET} - JELLYFIN_URL=${JELLYFIN_URL} - JELLYFIN_API_KEY=${JELLYFIN_API_KEY} - CLIENT_ID=5f573c9620494bae87890c0f08a60293 - CLIENT_SECRET=212476d9b0f3472eaa762d90b19b0ba8 # Server Configuration - PORT=5145 - HOST=0.0.0.0 - PYTHONUNBUFFERED=1 - FLASK_ENV=production # Download Paths (separate directory for girlfriend) - TRACK_OUTPUT='/data/girlfriend/{artist}/{album} - ({year})/{artist} - {title}.{output-ext}' - ALBUM_OUTPUT='/data/girlfriend/{artist}/{album} - ({year})/{artist} - {title}.{output-ext}' - PLAYLIST_OUTPUT='/data/girlfriend/{list-name}/{artist}/{title}.{output-ext}' - ARTIST_OUTPUT='/data/girlfriend/{artist}/{album} - ({year})/{artist} - {title}.{output-ext}' # Jellyfin Integration - TRIGGER_JELLYFIN_SCAN=True # Playlist Configuration (separate playlist) - GENERATE_M3U_PLAYLIST=True - M3U_PLAYLIST_NAME=girlfriend_test_playlist - M3U_PLAYLIST_PATH=/music/girlfriend/playlists - ABSOLUTE_SERVER_PATH=/music/girlfriend # Logging - EXTRA_LOGGING=True volumes: # IMPORTANT: Update these paths to match your server's directory structure - ./music:/music # Final music files - ./temp:/temp # Temporary files - ./data:/data # Persistent data - ./logs:/app/logs # Log files ports: - "5145:5145" restart: unless-stopped networks: - app-network # Resource limits (adjust based on your server) mem_limit: 2g cpus: 2.0 # Health check healthcheck: test: ["CMD", "curl", "-f", "http://localhost:5145/status"] interval: 30s timeout: 10s retries: 3 start_period: 60s ui-girlfriend: build: context: . dockerfile: Dockerfile.ui environment: # Production URLs - VITE_SERVER_URL=http://localhost:5146 - VITE_BACKEND_URL=http://backend-girlfriend:5145 # Use service name for container networking - VITE_BACKEND_URL_PROD=https://music.samcloud.ca - VITE_FRONTEND_URL_PROD=https://music.samcloud.ca - NODE_ENV=production volumes: - ./dist:/app/dist # Serve pre-built files ports: - "5146:5146" command: sh -c "yarn build && serve -s dist -l 5146" restart: unless-stopped depends_on: - backend-girlfriend networks: - app-network networks: app-network: driver: bridge volumes: temp_data_girlfriend: