From 5fb7f2cafe55c604308f12043eec3ba373a7fea4 Mon Sep 17 00:00:00 2001 From: virusdefender Date: Sun, 11 Jun 2017 01:21:54 +0800 Subject: [PATCH] init --- .gitignore | 1 + docker-compose.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .gitignore create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8fce603 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +data/ diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b87dd5b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,45 @@ +version: "2" +services: + oj_redis: + image: redis:3.0-alpine + restart: always + volumes: + - $PWD/data/redis:/data + + oj_mysql: + image: registry.cn-hangzhou.aliyuncs.com/qduoj/mysql + restart: always + volumes: + - $PWD/data/mysql:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD={YOUR_PASSWORD} + + judger: + image: registry.cn-hangzhou.aliyuncs.com/qduoj/judger + 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} + ports: + - "9000:8080" + oj_web_server: + image: registry.cn-hangzhou.aliyuncs.com/qduoj/oj_web_server + 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 + environment: + - TZ=Asia/Shanghai + - oj_env=server + - MYSQL_ENV_MYSQL_USER=root + - MYSQL_ENV_MYSQL_ROOT_PASSWORD={YOUR_PASSWORD} + ports: + - "0.0.0.0:80:8001"