Deploy
+Reuqirements:
- docker >= 1.12
- docker-compose >= 1.8 diff --git a/docs/mkdocs/search_index.json b/docs/mkdocs/search_index.json index cd97aa2..e43baee 100644 --- a/docs/mkdocs/search_index.json +++ b/docs/mkdocs/search_index.json @@ -182,7 +182,12 @@ }, { "location": "/JudgeServer/English/deploy/", - "text": "docker \n= 1.12\n\n\ndocker-compose \n= 1.8\n\n\n\n\nThree environment variables below must be set manully in \ndocker-compose.yml\n\n\n\n\nservice_discovery_url\n\n\njudger_token\n\n\nservice_url\n\n\n\n\njudge_server\n will send heartbeat request to \nservice_discovery_url\n.\n\n\nservice_url\n is used to tell server to send task to this url(\njudge_server\n).\n\n\nExample of \ndocker-compose.yml\n\n\nversion: \n2\n\nservices:\n judge_server:\n image: judge_server\n cpu_quota: 90000\n read_only: true\n tmpfs:\n - /tmp\n - /judger_run\n - /spj\n volumes:\n - /data/JudgeServer/tests/test_case:/test_case:ro\n - /data/log:/log\n - /data/JudgeServer:/code:ro\n environment:\n - judger_token=token\n - service_discovery_url=https://onlinejudge.me/service\n - service_url=http://1.2.3.4:12358\n ports:\n - \n0.0.0.0:12358:8080\n\n\n\n\n\nHeartbeat request\n\n\n\n\nMethod \nPOST\n\n\nX-JUDGE-SERVER-TOKEN\n: \nsha256(token)\n\n\nContent-Type\n: \napplication/json\n\n\n\n\nRequest data\n\n\n {\n \njudger_version\n: \n2.0.1\n,\n \nhostname\n: \nc45acd557074\n,\n \ncpu_core\n: 1,\n \nmemory\n: 30.3,\n \naction\n: \nheartbeat\n,\n \ncpu\n: 0,\n \nservice_url\n: null or \nhttp://1.2.3.4:8005\n\n}\n\n\n\n\nIf everything is OK, you should give a JSON response as follows\n\n\n{\n \ndata\n: \nsuccess\n,\n \nerr\n: null\n}", + "text": "Deploy\n\n\nReuqirements:\n\n\n\n\ndocker \n= 1.12\n\n\ndocker-compose \n= 1.8\n\n\n\n\nThree environment variables below must be set manully in \ndocker-compose.yml\n\n\n\n\nservice_discovery_url\n\n\njudger_token\n\n\nservice_url\n\n\n\n\njudge_server\n will send heartbeat request to \nservice_discovery_url\n.\n\n\nservice_url\n is used to tell server to send task to this url(\njudge_server\n).\n\n\nExample of \ndocker-compose.yml\n\n\nversion: \n2\n\nservices:\n judge_server:\n image: judge_server\n cpu_quota: 90000\n read_only: true\n tmpfs:\n - /tmp\n - /judger_run\n - /spj\n volumes:\n - /data/JudgeServer/tests/test_case:/test_case:ro\n - /data/log:/log\n - /data/JudgeServer:/code:ro\n environment:\n - judger_token=token\n - service_discovery_url=https://onlinejudge.me/service\n - service_url=http://1.2.3.4:12358\n ports:\n - \n0.0.0.0:12358:8080\n\n\n\n\n\nHeartbeat request\n\n\n\n\nMethod \nPOST\n\n\nX-JUDGE-SERVER-TOKEN\n: \nsha256(token)\n\n\nContent-Type\n: \napplication/json\n\n\n\n\nRequest data\n\n\n {\n \njudger_version\n: \n2.0.1\n,\n \nhostname\n: \nc45acd557074\n,\n \ncpu_core\n: 1,\n \nmemory\n: 30.3,\n \naction\n: \nheartbeat\n,\n \ncpu\n: 0,\n \nservice_url\n: null or \nhttp://1.2.3.4:8005\n\n}\n\n\n\n\nIf everything is OK, you should give a JSON response as follows\n\n\n{\n \ndata\n: \nsuccess\n,\n \nerr\n: null\n}", + "title": "Deploy" + }, + { + "location": "/JudgeServer/English/deploy/#deploy", + "text": "Reuqirements: docker = 1.12 docker-compose = 1.8 Three environment variables below must be set manully in docker-compose.yml service_discovery_url judger_token service_url judge_server will send heartbeat request to service_discovery_url . service_url is used to tell server to send task to this url( judge_server ). Example of docker-compose.yml version: 2 \nservices:\n judge_server:\n image: judge_server\n cpu_quota: 90000\n read_only: true\n tmpfs:\n - /tmp\n - /judger_run\n - /spj\n volumes:\n - /data/JudgeServer/tests/test_case:/test_case:ro\n - /data/log:/log\n - /data/JudgeServer:/code:ro\n environment:\n - judger_token=token\n - service_discovery_url=https://onlinejudge.me/service\n - service_url=http://1.2.3.4:12358\n ports:\n - 0.0.0.0:12358:8080", "title": "Deploy" }, { diff --git a/src/JudgeServer/English/deploy.md b/src/JudgeServer/English/deploy.md index 0f59246..d6e8c3f 100644 --- a/src/JudgeServer/English/deploy.md +++ b/src/JudgeServer/English/deploy.md @@ -1,3 +1,5 @@ +# Deploy + Reuqirements: - docker >= 1.12