docker: update instructions

This commit is contained in:
undefined committed 2021-12-29 18:24:38 +08:00
1 parent 3e7306e232
commit b32e7b53ec
5 files changed
+14 -21

No files matched your search

+2 -1
View File
@@ -1,5 +1,6 @@
FROM node:14
ADD ./entrypoint.sh /root/entrypoint.sh
RUN yarn global add pm2 hydrooj @hydrooj/ui-default
RUN chmod +x /root/entrypoint.sh
RUN chmod +x /root/entrypoint.sh && \
mkdir -p /root/.hydro
ENTRYPOINT /root/entrypoint.sh
-5
View File
@@ -1,22 +1,17 @@
#!/bin/sh
ROOT=/root/.hydro
mkdir -p $ROOT
if [ ! -f "$ROOT/addon.json" ]; then
echo '["@hydrooj/ui-default"]' > "$ROOT/addon.json"
fi
if [ ! -f "$ROOT/config.json" ]; then
# TODO 变成变量
echo '{"host": "oj-mongo", "port": "27017", "name": "hydro", "username": "", "password": ""}' > "$ROOT/config.json"
fi
if [ ! -f "$ROOT/first" ]; then
echo "for marking use only!" > "$ROOT/first"
hydrooj cli system set file.accessKey "$ACCESS_KEY"
hydrooj cli system set file.secretKey "$SECRET_KEY"
# TODO 变成变量
hydrooj cli system set file.endPoint http://oj-minio:9000/
hydrooj cli user create systemjudge@systemjudge.local root rootroot