mirror of
https://github.com/QingdaoU/oj-docs.git
synced 2025-01-16 00:22:52 +00:00
update
This commit is contained in:
parent
e308a57647
commit
1bbdbbeb52
@ -172,19 +172,24 @@
|
||||
<li>docker >= 1.12</li>
|
||||
<li>docker-compose >= 1.8</li>
|
||||
</ul>
|
||||
<p>Three environment variables below must be set manully in <code>docker-compose.yml</code></p>
|
||||
<p>Docker images:</p>
|
||||
<ul>
|
||||
<li>docker pull qduoj/judge_server (from Docker Hub)</li>
|
||||
<li>docker pull registry.cn-hangzhou.aliyuncs.com/v-image/judge_server && docker tag registry.cn-hangzhou.aliyuncs.com/v-image/judge_server qduoj/judge_server (from Aliyun mirror)</li>
|
||||
</ul>
|
||||
<p>Three environment variables below must be set manually in <code>docker-compose.yml</code></p>
|
||||
<ul>
|
||||
<li><code>service_discovery_url</code></li>
|
||||
<li><code>judger_token</code></li>
|
||||
<li><code>service_url</code></li>
|
||||
</ul>
|
||||
<p>You should manually create <code>token.txt</code> to store <code>judger_token</code>.</p>
|
||||
<p><code>judge_server</code> will send heartbeat request to <code>service_discovery_url</code> every five seconds.</p>
|
||||
<p><code>service_url</code> is used to tell server to send task to this url(<code>judge_server</code>).</p>
|
||||
<p>Example of <code>docker-compose.yml</code></p>
|
||||
<pre><code class="yml">version: "2"
|
||||
services:
|
||||
judge_server:
|
||||
image: judge_server
|
||||
image: qduoj/judge_server
|
||||
cpu_quota: 90000
|
||||
read_only: true
|
||||
cap_drop:
|
||||
@ -199,11 +204,11 @@ services:
|
||||
- /judger_run:exec,mode=777
|
||||
- /spj:exec,mode=777
|
||||
volumes:
|
||||
- /data/JudgeServer/tests/test_case:/test_case:ro
|
||||
- $PWD/tests/test_case:/test_case:ro
|
||||
- /data/log:/log
|
||||
- /data/JudgeServer:/code:ro
|
||||
- $PWD/server:/code:ro
|
||||
- $PWD/token.txt:/token.txt
|
||||
environment:
|
||||
- judger_token=token
|
||||
- service_discovery_url=https://virusdefender.net/service.php
|
||||
- service_url=http://1.2.3.4:12358
|
||||
ports:
|
||||
|
@ -202,12 +202,12 @@
|
||||
},
|
||||
{
|
||||
"location": "/JudgeServer/English/deploy/",
|
||||
"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 every five seconds.\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 cap_drop:\n - SETPCAP\n - MKNOD\n - NET_BIND_SERVICE\n - SYS_CHROOT\n - SETFCAP\n - FSETID\n tmpfs:\n - /tmp\n - /judger_run:exec,mode=777\n - /spj:exec,mode=777\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://virusdefender.net/service.php\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\n: \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 \nrunning_task_number\n: 2,\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\nDocker images:\n\n\n\n\ndocker pull qduoj/judge_server (from Docker Hub)\n\n\ndocker pull registry.cn-hangzhou.aliyuncs.com/v-image/judge_server \n docker tag registry.cn-hangzhou.aliyuncs.com/v-image/judge_server qduoj/judge_server (from Aliyun mirror)\n\n\n\n\nThree environment variables below must be set manually in \ndocker-compose.yml\n\n\n\n\nservice_discovery_url\n\n\nservice_url\n\n\n\n\nYou should manually create \ntoken.txt\n to store \njudger_token\n.\n\n\njudge_server\n will send heartbeat request to \nservice_discovery_url\n every five seconds.\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: qduoj/judge_server\n cpu_quota: 90000\n read_only: true\n cap_drop:\n - SETPCAP\n - MKNOD\n - NET_BIND_SERVICE\n - SYS_CHROOT\n - SETFCAP\n - FSETID\n tmpfs:\n - /tmp\n - /judger_run:exec,mode=777\n - /spj:exec,mode=777\n volumes:\n - $PWD/tests/test_case:/test_case:ro\n - /data/log:/log\n - $PWD/server:/code:ro\n - $PWD/token.txt:/token.txt\n environment:\n - service_discovery_url=https://virusdefender.net/service.php\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\n: \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 \nrunning_task_number\n: 2,\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 every five seconds. 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 cap_drop:\n - SETPCAP\n - MKNOD\n - NET_BIND_SERVICE\n - SYS_CHROOT\n - SETFCAP\n - FSETID\n tmpfs:\n - /tmp\n - /judger_run:exec,mode=777\n - /spj:exec,mode=777\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://virusdefender.net/service.php\n - service_url=http://1.2.3.4:12358\n ports:\n - 0.0.0.0:12358:8080",
|
||||
"text": "Reuqirements: docker = 1.12 docker-compose = 1.8 Docker images: docker pull qduoj/judge_server (from Docker Hub) docker pull registry.cn-hangzhou.aliyuncs.com/v-image/judge_server docker tag registry.cn-hangzhou.aliyuncs.com/v-image/judge_server qduoj/judge_server (from Aliyun mirror) Three environment variables below must be set manually in docker-compose.yml service_discovery_url service_url You should manually create token.txt to store judger_token . judge_server will send heartbeat request to service_discovery_url every five seconds. 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: qduoj/judge_server\n cpu_quota: 90000\n read_only: true\n cap_drop:\n - SETPCAP\n - MKNOD\n - NET_BIND_SERVICE\n - SYS_CHROOT\n - SETFCAP\n - FSETID\n tmpfs:\n - /tmp\n - /judger_run:exec,mode=777\n - /spj:exec,mode=777\n volumes:\n - $PWD/tests/test_case:/test_case:ro\n - /data/log:/log\n - $PWD/server:/code:ro\n - $PWD/token.txt:/token.txt\n environment:\n - service_discovery_url=https://virusdefender.net/service.php\n - service_url=http://1.2.3.4:12358\n ports:\n - 0.0.0.0:12358:8080",
|
||||
"title": "Deploy"
|
||||
},
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<url>
|
||||
<loc>None/</loc>
|
||||
<lastmod>2016-10-27</lastmod>
|
||||
<lastmod>2016-10-29</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
<url>
|
||||
<loc>None/Judger/</loc>
|
||||
<lastmod>2016-10-27</lastmod>
|
||||
<lastmod>2016-10-29</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
<url>
|
||||
<loc>None/JudgeServer/</loc>
|
||||
<lastmod>2016-10-27</lastmod>
|
||||
<lastmod>2016-10-29</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
|
@ -5,12 +5,18 @@ Reuqirements:
|
||||
- docker >= 1.12
|
||||
- docker-compose >= 1.8
|
||||
|
||||
Three environment variables below must be set manully in `docker-compose.yml`
|
||||
Docker images:
|
||||
|
||||
- docker pull qduoj/judge_server (from Docker Hub)
|
||||
- docker pull registry.cn-hangzhou.aliyuncs.com/v-image/judge_server && docker tag registry.cn-hangzhou.aliyuncs.com/v-image/judge_server qduoj/judge_server (from Aliyun mirror)
|
||||
|
||||
Three environment variables below must be set manually in `docker-compose.yml`
|
||||
|
||||
- `service_discovery_url`
|
||||
- `judger_token`
|
||||
- `service_url`
|
||||
|
||||
You should manually create `token.txt` to store `judger_token`.
|
||||
|
||||
`judge_server` will send heartbeat request to `service_discovery_url` every five seconds.
|
||||
|
||||
`service_url` is used to tell server to send task to this url(`judge_server`).
|
||||
@ -21,7 +27,7 @@ Example of `docker-compose.yml`
|
||||
version: "2"
|
||||
services:
|
||||
judge_server:
|
||||
image: judge_server
|
||||
image: qduoj/judge_server
|
||||
cpu_quota: 90000
|
||||
read_only: true
|
||||
cap_drop:
|
||||
@ -36,11 +42,11 @@ services:
|
||||
- /judger_run:exec,mode=777
|
||||
- /spj:exec,mode=777
|
||||
volumes:
|
||||
- /data/JudgeServer/tests/test_case:/test_case:ro
|
||||
- $PWD/tests/test_case:/test_case:ro
|
||||
- /data/log:/log
|
||||
- /data/JudgeServer:/code:ro
|
||||
- $PWD/server:/code:ro
|
||||
- $PWD/token.txt:/token.txt
|
||||
environment:
|
||||
- judger_token=token
|
||||
- service_discovery_url=https://virusdefender.net/service.php
|
||||
- service_url=http://1.2.3.4:12358
|
||||
ports:
|
||||
|
Loading…
x
Reference in New Issue
Block a user