-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (63 loc) · 2.1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (63 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# MusicFlow Docker Compose Configuration
# For local development and self-hosted production deployments
version: '3.8'
services:
musicflow:
build: .
container_name: musicflow
ports:
- "8000:8000"
environment:
# Required: Set these in your environment or .env file
- FLASK_ENV=${FLASK_ENV:-production}
- BASE_URL=${BASE_URL:-http://localhost:8000}
- SECRET_KEY=${SECRET_KEY:?SECRET_KEY is required}
- STRAVA_CLIENT_ID=${STRAVA_CLIENT_ID:?STRAVA_CLIENT_ID is required}
- STRAVA_CLIENT_SECRET=${STRAVA_CLIENT_SECRET:?STRAVA_CLIENT_SECRET is required}
- SPOTIFY_CLIENT_ID=${SPOTIFY_CLIENT_ID:?SPOTIFY_CLIENT_ID is required}
- SPOTIFY_CLIENT_SECRET=${SPOTIFY_CLIENT_SECRET:?SPOTIFY_CLIENT_SECRET is required}
# Database: Use Supabase PostgreSQL (recommended) or leave empty for SQLite
- DATABASE_URL=${DATABASE_URL:-}
- DATABASE_PATH=${DATABASE_PATH:-/data/musicflow.db}
volumes:
# Only needed if using SQLite (DATABASE_URL is empty)
- musicflow-data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
musicflow-data:
driver: local
# ===========================================
# USAGE INSTRUCTIONS
# ===========================================
#
# 1. Copy .env.example to .env and fill in your values:
# cp .env.example .env
# # Edit .env with your API credentials and Supabase DATABASE_URL
#
# 2. Build and start:
# docker-compose up -d --build
#
# 3. View logs:
# docker-compose logs -f
#
# 4. Stop:
# docker-compose down
#
# ===========================================
# DATABASE OPTIONS
# ===========================================
#
# Option 1: Supabase PostgreSQL (Recommended)
# - Create project at https://supabase.com
# - Get connection string from Settings > Database
# - Set DATABASE_URL in .env
#
# Option 2: SQLite (local dev only)
# - Leave DATABASE_URL empty
# - Data stored in musicflow-data volume