services: samcloud-music: build: . container_name: samcloud-music restart: unless-stopped env_file: - .env ports: - "6544:6544" # Map host port 6544 to container port 6544 extra_hosts: - "host.docker.internal:host-gateway" volumes: - /Volumes/Jellyfin Media/Music:/data # Final music files - /Volumes/Jellyfin Media/Music/temp:/temp # Temporary files - /Volumes/SamMgmt/Containers/SpotSpot/config:/config # Configuration files - /Volumes/SamMgmt/Containers/SamCloud Music/backend/templates:/app/backend/templates - /etc/localtime:/etc/localtime:ro # Sync time with host environment: # General Configuration - PYTHONUNBUFFERED=1 - CONFIG_PATH=/config/config.json - FFMPEG_LOCATION=/usr/bin/ffmpeg - HOST=0.0.0.0 - PORT=6544 - FLASK_ENV=production - WEBSOCKET_URL=ws://localhost:6544 # Download Paths (using single quotes to prevent shell expansion) - TRACK_OUTPUT='/data/{artist}/{album} - ({year})/{artist} - {title}.{output-ext}' - ALBUM_OUTPUT='/data/{artist}/{album} - ({year})/{artist} - {title}.{output-ext}' - PLAYLIST_OUTPUT='/data/{list-name}/{artist}/{title}.{output-ext}' - ARTIST_OUTPUT='/data/{artist}/{album} - ({year})/{artist} - {title}.{output-ext}' # Jellyfin Integration - TRIGGER_JELLYFIN_SCAN=${TRIGGER_JELLYFIN_SCAN:-False} - JELLYFIN_ADDRESS=${JELLYFIN_ADDRESS:-http://192.168.1.123:8096} - JELLYFIN_API_KEY=${JELLYFIN_API_KEY:-} # Spotify API Configuration - SPOTIPY_CLIENT_ID=${SPOTDL_CLIENT_ID} - SPOTIPY_CLIENT_SECRET=${SPOTDL_CLIENT_SECRET} - SPOTDL_CLIENT_ID=${SPOTDL_CLIENT_ID} - SPOTDL_CLIENT_SECRET=${SPOTDL_CLIENT_SECRET} # Playlist Configuration - GENERATE_M3U_PLAYLIST=${GENERATE_M3U_PLAYLIST:-True} - M3U_PLAYLIST_NAME=${M3U_PLAYLIST_NAME:-samcloud_music} - M3U_PLAYLIST_PATH=${M3U_PLAYLIST_PATH:-/data/playlists} - ABSOLUTE_SERVER_PATH=${ABSOLUTE_SERVER_PATH:-/data} # Logging - EXTRA_LOGGING=${EXTRA_LOGGING:-True} # Resource limits mem_limit: 2g cpus: 1.5 # Health check healthcheck: test: ["CMD", "curl", "-f", "http://localhost:6544/status"] interval: 30s timeout: 10s retries: 3 start_period: 60s