-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdocker-compose.staging.yml
336 lines (324 loc) · 9.16 KB
/
docker-compose.staging.yml
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
version: '3'
# Define common configurations that can be reused
x-common-environment: &common-environment
NODE_ENV: staging
APP_PORT: 8080
BASE_URL: https://staging.api.streameth.org
PLAYER_URL: https://staging.player.streameth.org
FRONTEND_URL: https://streameth-test.vercel.app
DB_PASSWORD_FILE: /run/secrets/db-password
DB_HOST: staging_mongodb
DB_USER: root
DB_NAME: streameth-staging
JWT_SECRET_FILE: /run/secrets/jwt-secret
JWT_EXPIRY: 30d
CORS_ORIGIN: "*"
CORS_CREDENTIALS: "true"
CORS_PROXY_URL: ""
LIVEPEER_API_KEY_FILE: /run/secrets/livepeer-api-key
THIRDWEB_SECRET_KEY_FILE: /run/secrets/thirdweb-secret-key
SPACES_KEY_FILE: /run/secrets/spaces-key
SPACES_SECRET_FILE: /run/secrets/spaces-secret
BUCKET_NAME: streameth-develop
BUCKET_URL: https://streameth-develop.ams3.digitaloceanspaces.com
LIVEPEER_WEBHOOK_SECRET_FILE: /run/secrets/livepeer-webhook-secret
LIVEPEER_BASE_URL: https://livepeer.studio
TELEGRAM_API_KEY_FILE: /run/secrets/telegram-api-key
TELEGRAM_CHAT_ID_FILE: /run/secrets/telegram-chat-id
OAUTH_SECRET_FILE: /run/secrets/oauth-secret
TWITTER_OAUTH_SECRET_FILE: /run/secrets/twitter-oauth-secret
TWITTER_CLIENT_ID_FILE: /run/secrets/twitter-client-id
GOOGLE_OAUTH_SECRET_FILE: /run/secrets/google-oauth-secret
GOOGLE_CLIENT_ID_FILE: /run/secrets/google-client-id
SERVICE_ACCOUNT_PRIVATE_KEY_FILE: /run/secrets/google-service-account-private-key
SERVICE_ACCOUNT_EMAIL_FILE: /run/secrets/google-service-account-email
MAIL_HOST: smtp.ethereal.email
MAIL_PORT: 587
MAIL_USER_FILE: /run/secrets/mail-user
MAIL_PASS_FILE: /run/secrets/mail-pass
MAGIC_LINK_SECRET_FILE: /run/secrets/magic-link-secret
MAGIC_LINK_EXPIRY: "30 days"
WALLET_ADDRESSES: ""
REMOTION_BASE_URL: http://reel-creator:3000
REMOTION_WEBHOOK_SECRET_FILE: /run/secrets/remotion-webhook-secret
REMOTION_ID: pebs
REMOTION_SITE_NAME: rendering-engine
REMOTION_WEBHOOK_URL: https://staging.api.streameth.org/webhook/remotion
PIPEDREAM_AUTH_TOKEN_FILE: /run/secrets/pipedream-auth-token
DEVCON_UPLOAD_ENDPOINT_FILE: /run/secrets/devcon-upload-endpoint
LOG_DIR: logs
LOG_FORMAT: dev
REDIS_PASSWORD_FILE: /run/secrets/redis-password
REDIS_HOST: redis
REDIS_PORT: 6379
OPENAI_API_KEY_FILE: /run/secrets/openai-api-key
GEMINI_API_KEY_FILE: /run/secrets/gemini-api-key
AWS_ACCESS_KEY_ID_FILE: /run/secrets/aws-access-key
AWS_SECRET_ACCESS_KEY_FILE: /run/secrets/aws-secret-key
STRIPE_SECRET_KEY_FILE: /run/secrets/stripe-secret-key
STRIPE_PUBLISHABLE_KEY_FILE: /run/secrets/stripe-publishable-key
PINECONE_API_KEY_FILE: /run/secrets/pinecone-api-key
x-common-deploy: &common-deploy
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
x-common-secrets: &common-secrets
- db-password
- jwt-secret
- spaces-key
- spaces-secret
- livepeer-api-key
- livepeer-webhook-secret
- telegram-api-key
- telegram-chat-id
- oauth-secret
- twitter-oauth-secret
- twitter-client-id
- google-oauth-secret
- google-client-id
- magic-link-secret
- mail-pass
- mail-user
- remotion-webhook-secret
- pipedream-auth-token
- devcon-upload-endpoint
- thirdweb-secret-key
- google-service-account-private-key
- google-service-account-email
- redis-password
- openai-api-key
- aws-access-key
- aws-secret-key
- stripe-secret-key
- stripe-publishable-key
- gemini-api-key
- pinecone-api-key
services:
server:
image: ghcr.io/streamethorg/streameth-platform/server:staging
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
- "traefik.http.services.staging-server.loadbalancer.server.port=8080"
- "traefik.http.services.staging-server.loadbalancer.server.scheme=http"
depends_on:
- mongodb
- redis
networks:
- traefik-public
- default
environment:
NODE_ENV: staging
<<: *common-environment
deploy:
<<: *common-deploy
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
- "traefik.http.services.staging-server.loadbalancer.server.port=8080"
- "traefik.http.services.staging-server.loadbalancer.server.scheme=http"
mode: replicated
replicas: 1
secrets: *common-secrets
stage-transcriptions:
image: ghcr.io/streamethorg/streameth-platform/stage-transcriptions:staging
networks:
- traefik-public
- default
depends_on:
- mongodb
- redis
- server
environment: *common-environment
deploy:
<<: *common-deploy
mode: replicated
replicas: 1
secrets: *common-secrets
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
mode: "non-blocking"
session-transcriptions:
image: ghcr.io/streamethorg/streameth-platform/session-transcriptions:staging
networks:
- traefik-public
- default
depends_on:
- mongodb
- redis
environment: *common-environment
deploy:
<<: *common-deploy
mode: replicated
replicas: 1
secrets: *common-secrets
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
mode: "non-blocking"
reel-creator:
image: ghcr.io/streamethorg/streameth-platform/reel-creator:staging
environment:
NODE_ENV: staging
SERVER_WEBHOOK_URL: https://staging.api.streameth.org/webhook/remotion
SERVER_WEBHOOK_SECRET_FILE: /run/secrets/remotion-webhook-secret
AWS_ACCESS_KEY_ID_FILE: /run/secrets/aws-access-key
AWS_SECRET_ACCESS_KEY_FILE: /run/secrets/aws-secret-key
BUCKET_NAME: streameth-develop
BUCKET_URL: https://streameth-develop.ams3.digitaloceanspaces.com
SPACES_KEY_FILE: /run/secrets/spaces-key
SPACES_SECRET_FILE: /run/secrets/spaces-secret
SITE_NAME: rendering-engine
PORT: 3000
networks:
- traefik-public
- default
deploy:
<<: *common-deploy
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
- "traefik.http.routers.reel-creator-staging.rule=Host(`staging.api.streameth.org`)"
- "traefik.http.services.reel-creator-staging.loadbalancer.server.port=3000"
- "traefik.http.routers.reel-creator-staging.service=reel-creator-staging"
- "traefik.http.routers.reel-creator-staging.tls=true"
- "traefik.http.routers.reel-creator-staging.tls.certresolver=myresolver"
secrets:
- aws-access-key
- aws-secret-key
- remotion-webhook-secret
- spaces-key
- spaces-secret
mongodb:
image: mongo:latest
volumes:
- mongodb_data:/data/db
environment:
NODE_ENV: staging
MONGO_INITDB_DATABASE: streameth-staging
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD_FILE: /run/secrets/db-password
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
command: --auth --bind_ip_all
networks:
- traefik-public
- default
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
secrets:
- db-password
redis:
image: redis:alpine
command: >
sh -c '
password=$$(cat /run/secrets/redis-password);
redis-server --requirepass "$$password"'
volumes:
- redis_data:/data
networks:
- default
secrets:
- redis-password
clips:
image: ghcr.io/streamethorg/streameth-platform/clips:staging
networks:
- traefik-public
- default
depends_on:
- mongodb
- redis
environment: *common-environment
deploy:
<<: *common-deploy
mode: replicated
replicas: 1
secrets: *common-secrets
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
mode: "non-blocking"
networks:
default:
traefik-public:
external: true
volumes:
mongodb_data:
redis_data:
secrets:
db-password:
external: true
jwt-secret:
external: true
spaces-key:
external: true
spaces-secret:
external: true
livepeer-api-key:
external: true
livepeer-webhook-secret:
external: true
telegram-api-key:
external: true
telegram-chat-id:
external: true
oauth-secret:
external: true
twitter-oauth-secret:
external: true
twitter-client-id:
external: true
google-oauth-secret:
external: true
google-client-id:
external: true
magic-link-secret:
external: true
mail-pass:
external: true
mail-user:
external: true
remotion-webhook-secret:
external: true
pipedream-auth-token:
external: true
devcon-upload-endpoint:
external: true
thirdweb-secret-key:
external: true
google-service-account-private-key:
external: true
google-service-account-email:
external: true
redis-password:
external: true
openai-api-key:
external: true
aws-access-key:
external: true
aws-secret-key:
external: true
stripe-secret-key:
external: true
stripe-publishable-key:
external: true
gemini-api-key:
external: true
pinecone-api-key:
external: true