-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (105 loc) · 2.84 KB
/
Copy pathdocker-compose.yml
File metadata and controls
109 lines (105 loc) · 2.84 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: music-tracker-backend
ports:
- "8000:8000"
volumes:
- ./data/db:/app/data/db
# - ./data/scheduler:/app/data/scheduler (désactivé, utiliser scheduled-output)
- ./data/scheduled-output:/app/data/magazine-editions
- ./config:/app/config
- ./backend:/app/backend
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
- ENVIRONMENT=production
- PYTHONUNBUFFERED=1
- PROJECT_ROOT=/app
- TZ=Europe/Paris
# Variables EurIA pour l'IA musicale
- EURIA_API_URL=https://api.infomaniak.com/2/ai/106561/openai/v1/chat/completions
- EURIA_BEARER_TOKEN=xAw7abygtFt9iB0cOJANoFPpkjPwjtSwTycaS_AGBd9sQedV11GH1ejHfYzL8zz3nWNNIL15pv18nkf2
- EURIA_MAX_ATTEMPTS=5
- EURIA_ERROR_MESSAGE=Aucune information disponible
# Variables Spotify pour enrichissement
- SPOTIFY_CLIENT_ID=3a00f0d1a886417eacf56c1908822bcf
- SPOTIFY_CLIENT_SECRET=cfc44da675264b5589dff6458d08071e
restart: unless-stopped
networks:
- music-tracker-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 40s
labels:
- "com.aime.service=backend"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
init-db:
build:
context: ./backend
dockerfile: Dockerfile
container_name: music-tracker-init
command: python -c "from app.database import init_db; init_db(); print('Database initialized')"
volumes:
- ./data:/app/data
- ./config:/app/config
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
- ENVIRONMENT=production
- PYTHONUNBUFFERED=1
- PROJECT_ROOT=/app
- TZ=Europe/Paris
networks:
- music-tracker-network
profiles:
- init
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: music-tracker-frontend
ports:
- "80:80"
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
- TZ=Europe/Paris
restart: unless-stopped
networks:
- music-tracker-network
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
labels:
- "com.aime.service=frontend"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
music-tracker-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
volumes:
data:
config: