创建Ubuntu启动脚本

This commit is contained in:
Shura 2016-04-12 13:25:06 +08:00 committed by virusdefender
parent 2ef935d922
commit 6bf751cba9

8
ubuntu-run.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
service docker start
service nginx start
base_path="/home/"
web_server_config="${base_path}OnlineJudge/dockerfiles/oj_web_server/"
judger_config="${base_path}OnlineJudge/dockerfiles/judger/"
cd $web_server_config && /usr/local/bin/docker-compose up -d
cd $judger_config && /usr/local/bin/docker-compose up -d