-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
149 lines (133 loc) · 4.09 KB
/
docker-compose.yaml
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
version: "3"
# Base docker-compose.yaml for Virtual Channel. This is *NOT* a functional
# docker-compose file taken alone, but it must be used with at least one
# override that includes either a build: or image: tag and appropriate
# traefik configuration.
x-logging:
&default-logging
options:
max-size: '1G'
max-file: '5'
driver: json-file
x-vc-environment:
# Env vars common to most containers
&default-vc-environment
- UspLicenseKey
- S3_ACCESS_KEY
- S3_SECRET_KEY
- S3_REGION
- LOG_LEVEL
- RABBITMQ_DEFAULT_USER
- RABBITMQ_DEFAULT_PASS
- RABBITMQ_HOST
- CELERY_BROKER
- CELERY_BACKEND
- APP_BACKEND
- MANIFEST_PROXY_HOST
# Origin only
- ORIGIN_PORT
- REMOTE_STORAGE_URL
# Virtual Channel API only
- API_PORT
- API_KEY
- API_INSECURE
- REMIX_TASK_TIMEOUT
# RabbitMQ only
- RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS
- DAYS_TO_KEEP_TRANSITIONS_FOR
# Scheduled tasks
- HOUSEKEEPING_CRON_HOUR
- HOUSEKEEPING_CRON_MINUTE
- CHECK_CHANNEL_SECONDS
x-vc-volumes:
&default-vc-volumes
- type: bind
source: ./channels
target: /channels
services:
# unified origin
origin:
image: ghcr.io/unifiedstreaming/virtual-channel-origin:1.14.4
logging: *default-logging
restart: always
environment: *default-vc-environment
volumes:
- type: bind
source: ./channels
target: /var/www/unified-origin/
# Virtual Channel application
virtual-channel-api:
image: ghcr.io/unifiedstreaming/virtual-channel-app:1.14.4
restart: always
logging: *default-logging
environment: *default-vc-environment
volumes: *default-vc-volumes
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --proxy-headers --forwarded-allow-ips *
# Manifest Proxy application
manifest-proxy:
image: ghcr.io/unifiedstreaming/virtual-channel-manifest-proxy:1.14.4
restart: always
logging: *default-logging
environment: *default-vc-environment
volumes:
- type: bind
source: ./channels
target: /channels
command: uvicorn app.main:app --host 0.0.0.0 --port 80 --proxy-headers --forwarded-allow-ips * --no-date-header
virtual-channel-worker-vod2live:
image: ghcr.io/unifiedstreaming/virtual-channel-app:1.14.4
restart: always
logging: *default-logging
environment: *default-vc-environment
volumes: *default-vc-volumes
command: celery -A app.tasks.vod2live worker -Q vod2live --loglevel info
virtual-channel-worker-transition:
image: ghcr.io/unifiedstreaming/virtual-channel-app:1.14.4
restart: always
logging: *default-logging
environment: *default-vc-environment
volumes: *default-vc-volumes
command: celery -A app.tasks.trigger_transition worker -Q trigger_transition --loglevel info
virtual-channel-worker-housekeeping:
image: ghcr.io/unifiedstreaming/virtual-channel-app:1.14.4
restart: always
logging: *default-logging
environment: *default-vc-environment
volumes: *default-vc-volumes
command: celery -A app.tasks.housekeeping worker --loglevel info
virtual-channel-celery-beat:
image: ghcr.io/unifiedstreaming/virtual-channel-app:1.14.4
restart: always
logging: *default-logging
environment: *default-vc-environment
volumes: *default-vc-volumes
command: celery -A app.task_schedule beat --loglevel info
# redis and rabbitmq for task queue and results storage
redis:
image: redis:7.0.4
restart: always
entrypoint: redis-server --appendonly yes
logging: *default-logging
volumes:
- redis_data:/data
rabbitmq:
logging: *default-logging
hostname: vc-rabbit
image: rabbitmq:3.11.0-alpine
restart: always
# Set consumer_timeout to allow Celery jobs with long ETA, see
# https://docs.celeryq.dev/en/stable/userguide/calling.html#eta-and-countdown
environment: *default-vc-environment
volumes:
- rabbitmq_data:/var/lib/rabbitmq
traefik:
image: traefik:v2.7
logging: *default-logging
restart: always
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
volumes:
rabbitmq_data:
driver: local
redis_data:
driver: local