-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
129 lines (118 loc) · 4 KB
/
docker-compose.prod.yml
File metadata and controls
129 lines (118 loc) · 4 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
128
129
version: "3"
services:
reverse-proxy:
image: traefik:v2.2
command: --api.insecure=true --providers.docker --entryPoints.web.address=:80 --entryPoints.web.forwardedHeaders.insecure --providers.file.filename=/etc/conf.yml
networks:
- executeit
ports:
# The HTTP port
- "80:80"
- "8080:8080"
volumes:
- ./traefik.yml:/etc/conf.yml
- /var/run/docker.sock:/var/run/docker.sock
redis:
image: redis
networks:
- executeit
app:
image: docker.pkg.github.com/execute-it/main-server/main-server
ports:
- "5000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./private.key:/usr/src/app/configs/private.key
networks:
- executeit
command: >
sh -c "pm2-runtime ecosystem.config.js"
environment:
- NODE_ENV=production
- PORT=5000
- DOCKER_SOCKET=/var/run/docker.sock
- USER_SERVER_URL=rooms.executeit.ml
- USER_SERVER_IMAGE=docker.pkg.github.com/execute-it/user-image/user-image
- USER_SERVER_MEM_LIMIT=268435456
- USER_SERVER_CPU_PERIOD=100000
- USER_SERVER_CPU_QUOTA=50000
- USER_SERVER_NETWORK=executeit
- MONGO_HOST=mongo
- MONGO_DB_NAME=executeit
- MONGO_USER=root
- MONGO_PASSWORD=example
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- GOOGLE_CALLBACK_URL=https://api.executeit.ml/auth/google/callback
- JWT_SECRET=gocoronago
- OT_SERVER_URL=https://ot.executeit.ml/api/rest
- FRONTEND_REDIRECT_URL=https://executeit.ml/callback
- AUTH_SERVER_URL=https://api.executeit.ml/auth
- USER_DATA_BASE_PATH=${USER_DATA_PATH} # without trailing /
- REDIS_HOST=redis
- REDIS_PORT=6379
- AUTO_CULL_QUEUE=auto-cull-queue
- AUTO_SAVE_QUEUE=auto-save-queue
- MAX_ROOMS_LIMIT=2
labels:
- "traefik.http.routers.app.rule=Host(`api.executeit.ml`)"
- "traefik.http.routers.portfwdauth.rule=Host(`rooms.executeit.ml`)&&Path(`/port-fwd-auth`)"
mongo:
image: mongo
restart: always
networks:
- executeit
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
volumes:
- ./mongo-volume:/data/db
ot-server:
image: convergencelabs/convergence-omnibus
networks:
- executeit
environment:
CONVERGENCE_ADMIN_USERNAME: ${CONVERGENCE_USERNAME}
CONVERGENCE_ADMIN_PASSWORD: ${CONVERGENCE_PASSWORD}
volumes:
- ./ot-volume:/orientdb/databases
ports:
- "80"
labels:
- "traefik.http.routers.ot-server.rule=Host(`ot.executeit.ml`)"
- "traefik.http.middlewares.ot-server-auth.forwardauth.address=https://api.executeit.ml/auth"
- "traefik.http.middlewares.ot-server-auth.forwardauth.trustForwardHeader=true"
- "traefik.http.routers.ot-server.middlewares=ot-server-auth"
auto-save-cull:
image: docker.pkg.github.com/execute-it/auto-save-cull/auto-save-cull
depends_on:
- ot-server
environment:
CONVERGENCE_USERNAME: ${CONVERGENCE_USERNAME}
CONVERGENCE_PASSWORD: ${CONVERGENCE_PASSWORD}
OT_SERVER_URL: "http://ot-server/api"
USER_DATA_BASE_PATH: "/worker/data" # Path inside container
REDIS_HOST: redis
REDIS_PORT: "6379"
AUTOSAVE_INTERVAL: 4 # In secs
AUTOCULL_INTERVAL: 10 # In secs (60*5)
DOCKER_SOCKET: "/var/run/docker.sock"
AUTO_CULL_QUEUE: "auto-cull-queue"
AUTO_SAVE_QUEUE: "auto-save-queue"
command: "./wait-for-it.sh ot-server:80 -q -- node app"
networks:
- executeit
volumes:
- ${USER_DATA_PATH}:/worker/data
- /var/run/docker.sock:/var/run/docker.sock
mediasoup-server:
image: docker.pkg.github.com/execute-it/mediasoup-server/mediasoup-server
environment:
SERVER_PORT: 8000 # Ensure this is the same in ./traefik.yml file (for reverse proxy)
RTC_IP: ${HOST_IP}
RTC_ANNOUNCED_IP: ${HOST_IP}
network_mode: host
networks:
executeit:
external:
name: executeit