-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (63 loc) · 1.51 KB
/
docker-compose.yml
File metadata and controls
66 lines (63 loc) · 1.51 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
---
services:
api:
build:
context: .
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_DB}
REDIS_URL: redis://redis:6379
TMDB_API_KEY: ${TMDB_API_KEY}
IMDB_API_KEY: ${IMDB_API_KEY}
TVDB_API_KEY: ${TVDB_API_KEY}
JELLYFIN_API_KEY: ${JELLYFIN_API_KEY}
RADARR_API_KEY: ${RADARR_API_KEY}
SONARR_API_KEY: ${SONARR_API_KEY}
TZ: ${TZ}
UID: ${UID}
GID: ${GID}
volumes:
- .:/app
command: >
uvicorn src.api.main:app --host 0.0.0.0 --port 8000 --reload
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
db:
image: postgres:17
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
TZ: ${TZ}
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: always
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]
interval: 30s
timeout: 10s
retries: 3
redis:
image: redis:alpine
ports:
- "6379:6379"
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
volumes:
db_data: