mirror of
https://github.com/QingdaoU/OnlineJudgeDeploy.git
synced 2024-12-29 16:01:55 +00:00
66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
version: "3"
|
|
services:
|
|
|
|
oj-redis:
|
|
image: redis:4.0-alpine
|
|
container_name: oj-redis
|
|
restart: always
|
|
volumes:
|
|
- ./data/redis:/data
|
|
|
|
oj-postgres:
|
|
image: postgres:10-alpine
|
|
container_name: oj-postgres
|
|
restart: always
|
|
volumes:
|
|
- ./data/postgres:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_DB=onlinejudge
|
|
- POSTGRES_USER=onlinejudge
|
|
- POSTGRES_PASSWORD=onlinejudge
|
|
|
|
judge-server:
|
|
image: registry.cn-hangzhou.aliyuncs.com/onlinejudge/judge_server
|
|
container_name: judge-server
|
|
restart: always
|
|
read_only: true
|
|
cap_drop:
|
|
- SETPCAP
|
|
- MKNOD
|
|
- NET_BIND_SERVICE
|
|
- SYS_CHROOT
|
|
- SETFCAP
|
|
- FSETID
|
|
tmpfs:
|
|
- /tmp
|
|
volumes:
|
|
- ./data/backend/test_case:/test_case:ro
|
|
- ./data/judge_server/log:/log
|
|
- ./data/judge_server/run:/judger
|
|
environment:
|
|
- SERVICE_URL=http://judge-server:8080
|
|
- BACKEND_URL=http://oj-backend:8000/api/judge_server_heartbeat/
|
|
- TOKEN=CHANGE_THIS
|
|
# - judger_debug=1
|
|
|
|
oj-backend:
|
|
image: registry.cn-hangzhou.aliyuncs.com/onlinejudge/oj_backend
|
|
container_name: oj-backend
|
|
restart: always
|
|
depends_on:
|
|
- oj-redis
|
|
- oj-postgres
|
|
- judge-server
|
|
volumes:
|
|
- ./data/backend:/data
|
|
environment:
|
|
- POSTGRES_DB=onlinejudge
|
|
- POSTGRES_USER=onlinejudge
|
|
- POSTGRES_PASSWORD=onlinejudge
|
|
- JUDGE_SERVER_TOKEN=CHANGE_THIS
|
|
# - FORCE_HTTPS=1
|
|
# - STATIC_CDN_HOST=cdn.oj.com
|
|
ports:
|
|
- "0.0.0.0:80:8000"
|
|
- "0.0.0.0:443:1443"
|