OnlineJudgeDeploy/docker-compose.yml

62 lines
1.4 KiB
YAML
Raw Normal View History

2017-10-31 12:26:36 +00:00
version: "3"
2017-06-10 17:21:54 +00:00
services:
2017-11-25 04:04:02 +00:00
oj-redis:
2018-11-05 02:36:05 +00:00
image: redis:4.0-alpine
2017-10-31 12:26:36 +00:00
restart: always
volumes:
2019-04-09 00:36:43 +00:00
- ./data/redis:/data
2017-11-25 04:04:02 +00:00
oj-postgres:
2018-11-05 02:36:05 +00:00
image: postgres:10-alpine
2017-10-31 12:26:36 +00:00
restart: always
volumes:
2019-04-09 00:36:43 +00:00
- ./data/postgres:/var/lib/postgresql/data
2017-10-31 12:26:36 +00:00
environment:
- POSTGRES_DB=onlinejudge
- POSTGRES_USER=onlinejudge
- POSTGRES_PASSWORD=onlinejudge
2017-06-10 17:21:54 +00:00
2024-02-03 15:58:37 +00:00
oj-judge:
2024-04-07 10:42:11 +00:00
image: registry.cn-hongkong.aliyuncs.com/oj-image/judge:1.6.1
2018-03-09 08:58:20 +00:00
restart: always
2017-10-31 12:26:36 +00:00
read_only: true
cap_drop:
- SETPCAP
- MKNOD
- NET_BIND_SERVICE
- SYS_CHROOT
- SETFCAP
- FSETID
tmpfs:
- /tmp
volumes:
2019-04-09 00:36:43 +00:00
- ./data/backend/test_case:/test_case:ro
- ./data/judge_server/log:/log
- ./data/judge_server/run:/judger
2017-10-31 12:26:36 +00:00
environment:
2024-02-03 15:58:37 +00:00
- SERVICE_URL=http://oj-judge:8080
2017-12-06 03:58:52 +00:00
- BACKEND_URL=http://oj-backend:8000/api/judge_server_heartbeat/
2017-10-31 12:26:36 +00:00
- TOKEN=CHANGE_THIS
2018-11-17 00:43:53 +00:00
# - judger_debug=1
2017-11-25 04:04:02 +00:00
oj-backend:
2024-04-07 10:42:11 +00:00
image: registry.cn-hongkong.aliyuncs.com/oj-image/backend:1.6.1
2018-03-09 08:58:20 +00:00
restart: always
2017-10-31 12:26:36 +00:00
depends_on:
2017-11-25 04:04:02 +00:00
- oj-redis
- oj-postgres
2024-02-03 16:24:17 +00:00
- oj-judge
2017-10-31 12:26:36 +00:00
volumes:
2019-04-09 00:36:43 +00:00
- ./data/backend:/data
2017-11-25 04:04:02 +00:00
environment:
- POSTGRES_DB=onlinejudge
- POSTGRES_USER=onlinejudge
- POSTGRES_PASSWORD=onlinejudge
- JUDGE_SERVER_TOKEN=CHANGE_THIS
2017-12-15 18:04:30 +00:00
# - FORCE_HTTPS=1
2018-01-02 12:21:06 +00:00
# - STATIC_CDN_HOST=cdn.oj.com
2017-10-31 12:26:36 +00:00
ports:
2017-11-25 04:04:02 +00:00
- "0.0.0.0:80:8000"
2018-01-02 12:21:06 +00:00
- "0.0.0.0:443:1443"