OnlineJudgeDeploy/docker-compose.yml

52 lines
1.5 KiB
YAML
Raw Normal View History

2017-06-10 17:21:54 +00:00
version: "2"
services:
oj_redis:
image: redis:3.0-alpine
2017-06-11 08:12:35 +00:00
container_name: oj_redis
2017-06-10 17:21:54 +00:00
restart: always
volumes:
- $PWD/data/redis:/data
oj_mysql:
image: registry.cn-hangzhou.aliyuncs.com/qduoj/mysql
2017-06-11 08:12:35 +00:00
container_name: oj_mysql
2017-06-10 17:21:54 +00:00
restart: always
volumes:
- $PWD/data/mysql:/var/lib/mysql
environment:
2017-06-11 08:12:35 +00:00
- MYSQL_ROOT_PASSWORD=MYSQL_PASSWORD_AAA
2017-06-10 17:21:54 +00:00
judger:
image: registry.cn-hangzhou.aliyuncs.com/qduoj/judger
2017-06-11 08:12:35 +00:00
container_name: judger
2017-06-10 17:21:54 +00:00
restart: always
volumes:
- $PWD/data/test_case:/var/judger/test_case
- $PWD/data/log:/var/judger/code/judge/log
environment:
- TZ=Asia/Shanghai
- rpc_token={YOUR_PASSWORD}
2017-06-11 08:12:35 +00:00
2017-06-10 17:21:54 +00:00
oj_web_server:
image: registry.cn-hangzhou.aliyuncs.com/qduoj/oj_web_server
2017-06-11 08:12:35 +00:00
container_name: oj_web_server
2017-06-10 17:21:54 +00:00
restart: always
links:
- oj_mysql
- oj_redis
- judger
volumes:
- $PWD/data/test_case:/code/test_case
- $PWD/data/upload:/code/upload
- $PWD/data/log:/code/log
2017-06-11 08:12:35 +00:00
- $PWD/data/ssl:/code/ssl
- $PWD/custom_settings.py:/code/oj/custom_settings.py
2017-06-10 17:21:54 +00:00
environment:
- TZ=Asia/Shanghai
- oj_env=server
- MYSQL_ENV_MYSQL_USER=root
2017-06-11 08:12:35 +00:00
- MYSQL_ENV_MYSQL_ROOT_PASSWORD=MYSQL_PASSWORD_AAA
2017-06-10 17:21:54 +00:00
ports:
2017-06-11 08:12:35 +00:00
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"