-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
267 lines (267 loc) · 10.2 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
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
---
version: '3'
services:
horse:
restart: always
image: ghcr.io/joint-online-judge/horse:${HORSE_TAG:-latest}
container_name: joj2-horse
depends_on:
- postgres
- redis
- lakefs
ports:
- 34765:34765
networks:
- default
environment:
HOST: joj2-horse
DB_HOST: joj2-postgres
DB_NAME: horse_production
DB_USERNAME: ${POSTGRES_USER:-postgres}
DB_PASSWORD: ${POSTGRES_PASSWORD:-pass}
DOMAIN: ${DOMAIN:-127.0.0.1:34765}
FORWARDED_ALLOW_IPS: ${FORWARDED_ALLOW_IPS:-*}
REDIS_HOST: joj2-redis
REDIS_PASSWORD: ${REDIS_PASSWORD:-sider}
RABBITMQ_HOST: joj2-rabbitmq
RABBITMQ_USERNAME: ${RABBITMQ_USERNAME:-rabbitmq}
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD:-pass}
RABBITMQ_VHOST: ${RABBITMQ_VHOST:-joj}
S3_HOST: joj2-minio
S3_PORT: 9000
S3_USERNAME: minioadmin
S3_PASSWORD: minioadmin
LAKEFS_S3_DOMAIN: s3.lakefs.example.com
LAKEFS_HOST: joj2-lakefs
LAKEFS_PORT: 8000
LAKEFS_USERNAME: ${LAKEFS_ACCESS_KEY_ID:-AKIAJBBEXWP4VZLK65TQ}
LAKEFS_PASSWORD: ${LAKEFS_SECRET_ACCESS_KEY:-2AITo44il6u2S05zJASbDsBFZuPBQl6jC0tXW3Hq}
JWT_SECRET: 33723d5b188ff63597367fa1d4ca7745524fa950802f844672c6c524e4c7ae0e
OAUTH_JACCOUNT: ${OAUTH_JACCOUNT:-false}
OAUTH_JACCOUNT_ID: ${OAUTH_JACCOUNT_ID:-}
OAUTH_JACCOUNT_SECRET: ${OAUTH_JACCOUNT_SECRET:-}
OAUTH_GITHUB: ${OAUTH_GITHUB:-false}
OAUTH_GITHUB_ID: ${OAUTH_GITHUB_ID:-}
OAUTH_GITHUB_SECRET: ${OAUTH_GITHUB_SECRET:-}
tty: true
go-horse:
restart: always
image: ghcr.io/joint-online-judge/go-horse:latest
container_name: joj2-go-horse
depends_on:
- postgres
- redis
- minio
ports:
- 34764:34764
networks:
- default
pid: host
environment:
HOST: joj2-go-horse
PORT: 34764
DB_HOST: joj2-postgres
DB_NAME: go_horse_production
DB_USERNAME: ${POSTGRES_USER:-postgres}
DB_PASSWORD: ${POSTGRES_PASSWORD:-pass}
DOMAIN: ${DOMAIN:-127.0.0.1:34765}
FORWARDED_ALLOW_IPS: ${FORWARDED_ALLOW_IPS:-*}
REDIS_HOST: joj2-redis
REDIS_PASSWORD: ${REDIS_PASSWORD:-sider}
RABBITMQ_HOST: joj2-rabbitmq
RABBITMQ_USERNAME: ${RABBITMQ_USERNAME:-rabbitmq}
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD:-pass}
RABBITMQ_VHOST: ${RABBITMQ_VHOST:-joj}
S3_HOST: joj2-minio
S3_PORT: 9000
S3_USERNAME: minioadmin
S3_PASSWORD: minioadmin
LAKEFS_S3_DOMAIN: s3.lakefs.example.com
LAKEFS_HOST: joj2-lakefs
LAKEFS_PORT: 8000
LAKEFS_USERNAME: ${LAKEFS_ACCESS_KEY_ID:-AKIAJBBEXWP4VZLK65TQ}
LAKEFS_PASSWORD: ${LAKEFS_SECRET_ACCESS_KEY:-2AITo44il6u2S05zJASbDsBFZuPBQl6jC0tXW3Hq}
JWT_SECRET: 33723d5b188ff63597367fa1d4ca7745524fa950802f844672c6c524e4c7ae0e
OAUTH_JACCOUNT: ${OAUTH_JACCOUNT:-false}
OAUTH_JACCOUNT_ID: ${OAUTH_JACCOUNT_ID:-}
OAUTH_JACCOUNT_SECRET: ${OAUTH_JACCOUNT_SECRET:-}
OAUTH_GITHUB: ${OAUTH_GITHUB:-false}
OAUTH_GITHUB_ID: ${OAUTH_GITHUB_ID:-}
OAUTH_GITHUB_SECRET: ${OAUTH_GITHUB_SECRET:-}
tty: true
postgres:
restart: always
image: postgres:13.3
container_name: joj2-postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-pass}
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_MULTIPLE_DATABASES: lakefs horse_production
volumes:
- /opt/joj_data:/var/lib/postgresql/data
- type: bind
source: ./postgresql-initdb.sh
target: /docker-entrypoint-initdb.d/postgresql-initdb.sh
read_only: true
networks:
- default
tty: true
minio:
restart: always
image: minio/minio
container_name: joj2-minio
volumes:
- /opt/joj_data/minio/data:/data
- /opt/joj_data/minio/config:/root/.minio
networks:
- default
command: server /data --console-address ":9091"
tty: true
lakefs:
restart: always
image: treeverse/lakefs:0.46.0
container_name: joj2-lakefs
depends_on:
- postgres
- minio
environment:
- LAKEFS_AUTH_ENCRYPT_SECRET_KEY=${LAKEFS_AUTH_ENCRYPT_SECRET_KEY:-some random secret string}
- LAKEFS_DATABASE_CONNECTION_STRING=postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-pass}@joj2-postgres/lakefs?sslmode=disable
- LAKEFS_BLOCKSTORE_TYPE=${LAKEFS_BLOCKSTORE_TYPE:-s3}
- LAKEFS_BLOCKSTORE_S3_ENDPOINT=http://joj2-minio:9000
- LAKEFS_BLOCKSTORE_S3_FORCE_PATH_STYLE=true
- LAKEFS_BLOCKSTORE_S3_CREDENTIALS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-minioadmin}
- LAKEFS_BLOCKSTORE_S3_CREDENTIALS_ACCESS_SECRET_KEY=${AWS_SECRET_ACCESS_KEY:-minioadmin}
- LAKEFS_GATEWAYS_S3_DOMAIN_NAME=${LAKEFS_GATEWAYS_S3_DOMAIN_NAME:-s3.lakefs.example.com:8000}
- LAKEFS_LOGGING_LEVEL=${LAKEFS_LOGGING_LEVEL:-INFO}
- LAKEFS_STATS_ENABLED=true
- LAKEFS_COMMITTED_LOCAL_CACHE_DIR=${LAKEFS_COMMITTED_LOCAL_CACHE_DIR:-/home/lakefs/.local_tier}
- LAKEFS_USERNAME=${LAKEFS_USERNAME:-lakefs}
- LAKEFS_ACCESS_KEY_ID=${LAKEFS_ACCESS_KEY_ID:-AKIAJBBEXWP4VZLK65TQ}
- LAKEFS_SECRET_ACCESS_KEY=${LAKEFS_SECRET_ACCESS_KEY:-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}
volumes:
- type: bind
source: ./lakefs-start.sh
target: /home/lakefs/lakefs-start.sh
read_only: true
networks:
default:
aliases:
- s3.lakefs.example.com
tty: true
entrypoint: [/bin/sh, /home/lakefs/lakefs-start.sh]
redis:
restart: always
image: redis:6.2.4-alpine
container_name: joj2-redis
volumes:
- /opt/redis_data:/data
networks:
- default
tty: true
command: redis-server --requirepass ${REDIS_PASSWORD:-sider}
rabbitmq:
restart: always
image: rabbitmq:3.9-alpine
container_name: joj2-rabbitmq
volumes:
- /opt/rabbitmq_data:/var/lib/rabbitmq
- type: bind
source: ./rabbitmq-start.sh
target: /root/rabbitmq-start.sh
read_only: true
tty: true
command: [/bin/bash, /root/rabbitmq-start.sh]
environment:
RABBITMQ_USERNAME: ${RABBITMQ_USERNAME:-rabbitmq}
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD:-pass}
RABBITMQ_VHOST: ${RABBITMQ_VHOST:-joj}
tiger-1:
restart: always
image: ghcr.io/joint-online-judge/tiger:${TIGER_TAG:-latest}
privileged: true
depends_on:
- horse
- rabbitmq
networks:
- default
tty: true
container_name: joj2-tiger-1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
HORSE_USERNAME: ${TIGER_1_USERNAME:-tiger-1}
HORSE_PASSWORD: ${TIGER_1_PASSWORD:-string}
LAKEFS_S3_DOMAIN: s3.lakefs.example.com
LAKEFS_HOST: joj2-lakefs
LAKEFS_PORT: 8000
LAKEFS_USERNAME: ${TIGER_1_LAKEFS_USERNAME:-}
LAKEFS_PASSWORD: ${TIGER_1_LAKEFS_PASSWORD:-}
REDIS_HOST: joj2-redis
REDIS_PASSWORD: ${REDIS_PASSWORD:-sider}
BACKEND_URL: rpc://
BROKER_URL: amqp://${RABBITMQ_USERNAME:-rabbitmq}:${RABBITMQ_PASSWORD:-pass}@joj2-rabbitmq:5672/${RABBITMQ_VHOST:-joj}
tiger-2:
restart: always
image: ghcr.io/joint-online-judge/tiger:${TIGER_TAG:-latest}
privileged: true
depends_on:
- horse
- rabbitmq
networks:
- default
tty: true
container_name: joj2-tiger-2
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
HORSE_USERNAME: ${TIGER_2_USERNAME:-tiger-2}
HORSE_PASSWORD: ${TIGER_2_USERNAME:-string}
LAKEFS_S3_DOMAIN: s3.lakefs.example.com
LAKEFS_HOST: joj2-lakefs
LAKEFS_PORT: 8000
LAKEFS_USERNAME: ${TIGER_2_LAKEFS_USERNAME:-}
LAKEFS_PASSWORD: ${TIGER_2_LAKEFS_PASSWORD:-}
REDIS_HOST: joj2-redis
REDIS_PASSWORD: ${REDIS_PASSWORD:-sider}
BACKEND_URL: rpc://
BROKER_URL: amqp://${RABBITMQ_USERNAME:-rabbitmq}:${RABBITMQ_PASSWORD:-pass}@joj2-rabbitmq:5672/${RABBITMQ_VHOST:-joj}
go-tiger-1:
restart: always
image: ghcr.io/joint-online-judge/go-tiger:latest
privileged: true
depends_on:
- go-horse
- redis
networks:
- default
tty: true
container_name: joj2-go-tiger-1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
HORSE_USERNAME: ${TIGER_1_USERNAME:-tiger-1}
HORSE_PASSWORD: ${TIGER_1_PASSWORD:-string}
REDIS_HOST: joj2-redis
REDIS_PASSWORD: ${REDIS_PASSWORD:-sider}
go-tiger-2:
restart: always
image: ghcr.io/joint-online-judge/go-tiger:latest
privileged: true
depends_on:
- go-horse
- redis
networks:
- default
tty: true
container_name: joj2-go-tiger-2
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
HORSE_USERNAME: ${TIGER_2_USERNAME:-tiger-2}
HORSE_PASSWORD: ${TIGER_2_PASSWORD:-string}
REDIS_HOST: joj2-redis
REDIS_PASSWORD: ${REDIS_PASSWORD:-sider}
networks:
default: