forked from AnubisLMS/Anubis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
228 lines (200 loc) · 5.97 KB
/
docker-compose.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
###############################################################
# #
# This file is meant for debugging ONLY. Do not use in prod #
# #
###############################################################
version: '3.7'
services:
traefik:
image: "traefik:v2.2"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.http.address=:80"
- "--entrypoints.https.address=:443"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
labels:
- "traefik.enable=false"
api:
image: registry.digitalocean.com/anubis/api:latest
build: ./api
command: sh -c "while true; do python3 dev.py; sleep 1; done"
ports:
- 5000:5000
environment:
- "MINDEBUG=0"
- "DEBUG=1"
- "DB_HOST=db"
- "GITHUB_TOKEN"
volumes:
- "./api:/opt/app"
labels:
- "traefik.enable=true"
- "traefik.http.services.api.loadbalancer.server.port=5000"
- "traefik.http.middlewares.strip-api.stripprefix.prefixes=/api"
- "traefik.http.routers.api-public.rule=(Host(`localhost`) && PathPrefix(`/api/`)) || (Host(`localhost`) && PathPrefix(`/api/`) && HeadersRegexp(`web`, `new`))"
- "traefik.http.routers.api-public.entrypoints=http,https"
- "traefik.http.routers.api-public.middlewares=strip-api@docker"
pipeline-api:
build: ./api
image: registry.digitalocean.com/anubis/api:latest
environment:
- "DEBUG=1"
- "DB_HOST=db"
- "GITHUB_TOKEN"
- "CREATE_APP_FUNCTION=create_pipeline_app"
ports:
- 127.0.0.1:5004:5004
volumes:
- "./api:/opt/app"
labels:
- "traefik.enable=false"
rpc-default:
build: ./api
command: "rq worker -u redis://:anubis@redis-master default"
environment:
- "DEBUG=1"
- "DB_HOST=db"
- "GITHUB_TOKEN"
volumes:
- "./api:/opt/app"
labels:
- "traefik.false=enable"
rpc-theia:
build: ./api
command: "rq worker -u redis://:anubis@redis-master theia"
environment:
- "DEBUG=1"
- "DB_HOST=db"
- "GITHUB_TOKEN"
volumes:
- "./api:/opt/app"
labels:
- "traefik.enable=false"
rpc-regrade:
build: ./api
command: "rq worker -u redis://:anubis@redis-master regrade"
environment:
- "DEBUG=1"
- "DB_HOST=db"
- "GITHUB_TOKEN"
volumes:
- "./api:/opt/app"
labels:
- "traefik.enable=false"
web:
image: registry.digitalocean.com/anubis/web:latest
build: ./web
web-dev:
image: node:16-alpine
user: 1000:1000
working_dir: /opt/app
command: sh -c 'yarn && yarn run start'
environment:
NODE_ENV: development
REACT_APP_DEV: dev
volumes:
- ./web:/opt/app
ports:
- 127.0.0.1:3000:3000
labels:
- "traefik.enable=true"
- "traefik.http.services.web.loadbalancer.server.port=3000"
- "traefik.http.routers.web-public.rule=Host(`localhost`) && HeadersRegexp(`Cookie`, `web=new`)"
- "traefik.http.routers.web-public.entrypoints=http,https"
old-web:
image: registry.digitalocean.com/anubis/old-web:latest
build: ./old-web
old-web-dev:
image: node:16-alpine
user: 1000:1000
working_dir: /opt/app
command: sh -c 'yarn && yarn run start'
environment:
NODE_ENV: development
REACT_APP_DEV: dev
volumes:
- ./old-web:/opt/app
labels:
- "traefik.enable=true"
- "traefik.http.services.old-web.loadbalancer.server.port=3000"
- "traefik.http.routers.old-web-public.rule=Host(`localhost`)"
- "traefik.http.routers.old-web-public.entrypoints=http,https"
db:
image: mariadb:10.6
dns: [8.8.8.8]
command:
- "mysqld"
- "--max-allowed-packet=1073741824"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
ports:
- "127.0.0.1:3306:3306"
environment:
- "MYSQL_ROOT_PASSWORD=anubis"
- "MYSQL_DATABASE=anubis"
- "MYSQL_USER=anubis"
- "MYSQL_PASSWORD=anubis"
volumes:
- "db_data:/var/lib/mysql"
labels:
- "traefik.enable=false"
redis-master:
image: redis:latest
command: redis-server --requirepass anubis
ports:
- "127.0.0.1:6379:6379"
labels:
- "traefik.enable=false"
theia-base-38:
image: registry.digitalocean.com/anubis/theia-base:python-3.8
build:
context: ./theia/ide/theia-base
args:
PY_VERSION: '3.8.12'
theia-base-39:
image: registry.digitalocean.com/anubis/theia-base:python-3.9
build:
context: ./theia/ide/theia-base
args:
PY_VERSION: '3.9.9'
theia-base-310:
image: registry.digitalocean.com/anubis/theia-base:python-3.10
build:
context: ./theia/ide/theia-base
args:
PY_VERSION: '3.10.1'
theia-golang:
image: registry.digitalocean.com/anubis/theia-golang:latest
build: ./theia/ide/theia-golang
theia-xv6:
image: registry.digitalocean.com/anubis/theia-xv6:latest
build: ./theia/ide/theia-xv6
theia-admin:
image: registry.digitalocean.com/anubis/theia-admin:latest
build: ./theia/ide/theia-admin
theia-devops:
image: registry.digitalocean.com/anubis/theia-devops:latest
build: ./theia/ide/theia-devops
theia-software-engineering:
image: registry.digitalocean.com/anubis/theia-software-engineering:latest
build: ./theia/ide/theia-software-engineering
theia-jepst:
image: registry.digitalocean.com/anubis/theia-jepst:latest
build: ./theia/ide/theia-jepst
theia-proxy:
image: registry.digitalocean.com/anubis/theia-proxy:latest
build: ./theia/proxy
theia-init:
image: registry.digitalocean.com/anubis/theia-init:latest
build: ./theia/init
theia-sidecar:
image: registry.digitalocean.com/anubis/theia-sidecar:latest
build: ./theia/sidecar
volumes:
db_data: