-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
127 lines (121 loc) · 3.46 KB
/
docker-compose.yml
File metadata and controls
127 lines (121 loc) · 3.46 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
services:
postgres:
image: postgres:16-alpine
container_name: iptv-postgres
environment:
POSTGRES_DB: iptv_manager
POSTGRES_USER: iptv_user
POSTGRES_PASSWORD: password
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U iptv_user -d iptv_manager"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: iptv-redis
command: redis-server --appendonly yes
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
backend:
image: ghcr.io/neon9809/iptv-manager-backend:latest
build:
context: .
dockerfile: Dockerfile.backend
container_name: iptv-backend
ports:
- "8000:8000"
environment:
- SERVICE_NAME=backend
- DATABASE_URL=postgresql+asyncpg://iptv_user:password@postgres:5432/iptv_manager
- REDIS_URL=redis://redis:6379/0
- ANALYSIS_FREQUENCY_MINUTES=45
- ANALYSIS_WORKERS=6
- ANALYSIS_TIMEOUT_SECONDS=3
- FULL_ANALYSIS_TIMEOUT_SECONDS=30
- BITRATE_RECORD_DURATION_SECONDS=10
- FORGIVENESS_PARAM=10
- CHANNEL_ALIAS_URL=https://raw.githubusercontent.com/yaoxieyoulei/YYKM_assets/main/channel_alias.json
volumes:
- app_data:/app/app/data
- app_logo:/app/app/static/logo
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
frontend:
image: ghcr.io/neon9809/iptv-manager-frontend:latest
build:
context: .
dockerfile: Dockerfile.frontend
container_name: iptv-frontend
ports:
- "8001:80"
depends_on:
backend:
condition: service_healthy
celery-worker:
image: ghcr.io/neon9809/iptv-manager-backend:latest
build:
context: .
dockerfile: Dockerfile.backend
container_name: iptv-celery-worker
environment:
- SERVICE_NAME=celery-worker
- DATABASE_URL=postgresql+asyncpg://iptv_user:password@postgres:5432/iptv_manager
- REDIS_URL=redis://redis:6379/0
- ANALYSIS_FREQUENCY_MINUTES=45
- ANALYSIS_WORKERS=6
- ANALYSIS_TIMEOUT_SECONDS=3
- FULL_ANALYSIS_TIMEOUT_SECONDS=30
- BITRATE_RECORD_DURATION_SECONDS=10
- FORGIVENESS_PARAM=10
- CHANNEL_ALIAS_URL=https://raw.githubusercontent.com/yaoxieyoulei/YYKM_assets/main/channel_alias.json
- CELERY_LOG_ENABLED=true
volumes:
- app_data:/app/app/data
- app_logo:/app/app/static/logo
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
backend:
condition: service_healthy
celery-beat:
image: ghcr.io/neon9809/iptv-manager-backend:latest
build:
context: .
dockerfile: Dockerfile.backend
container_name: iptv-celery-beat
environment:
- SERVICE_NAME=celery-beat
- DATABASE_URL=postgresql+asyncpg://iptv_user:password@postgres:5432/iptv_manager
- REDIS_URL=redis://redis:6379/0
volumes:
- app_data:/app/app/data
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
backend:
condition: service_healthy
volumes:
postgres_data:
redis_data:
app_data:
app_logo: