diff --git a/Dockerfile b/Dockerfile index fc00831..36a14e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,4 @@ HEALTHCHECK --interval=5s --retries=3 CMD python /code/service.py ADD server /code WORKDIR /code EXPOSE 8080 -CMD /bin/bash /code/run.sh +ENTRYPOINT /code/entrypoint.sh diff --git a/client/Python/client.py b/client/Python/client.py index 9b1250a..3fa8c64 100644 --- a/client/Python/client.py +++ b/client/Python/client.py @@ -53,7 +53,7 @@ class JudgeServerClient(object): if __name__ == "__main__": - token = "123456" + token = "YOUR_TOKEN_HERE" c_src = r""" #include diff --git a/server/run.sh b/server/entrypoint.sh old mode 100644 new mode 100755 similarity index 83% rename from server/run.sh rename to server/entrypoint.sh index 4802a1e..c7f58d1 --- a/server/run.sh +++ b/server/entrypoint.sh @@ -1,7 +1,5 @@ #!/usr/bin/env bash chown compiler:compiler /spj -echo 0 > /tmp/counter core=$(grep --count ^processor /proc/cpuinfo) n=$(($core*2)) -chmod 400 /tmp/counter exec gunicorn --workers $n --threads $n --error-logfile /log/gunicorn.log --time 600 --bind 0.0.0.0:8080 server:wsgiapp