install: update

This commit is contained in:
undefined committed 2021-07-08 16:31:43 +08:00
1 parent 8d15219757
commit 215a3d07e0
5 files changed
+17 -16

No files matched your search

-4
View File
@@ -1,9 +1,5 @@
FROM node:14
ADD ./entrypoint.sh /root/entrypoint.sh
RUN yarn global add pm2 hydrooj @hydrooj/ui-default
RUN chmod +x /root/entrypoint.sh
ENTRYPOINT /root/entrypoint.sh
-1
View File
@@ -1,7 +1,6 @@
#!/bin/sh
ROOT=/root/.hydro
mkdir -p $ROOT
if [ ! -f "$ROOT/addon.json" ]; then
+6 -7
View File
@@ -1,12 +1,5 @@
FROM node:14
ADD ./entrypoint.sh /root/entrypoint.sh
ADD ./judge.yaml /root/judge.yaml
RUN yarn global add pm2 @hydrooj/hydrojudge && \
wget https://s3.undefined.moe/file/executor-amd64 -O /usr/bin/sandbox && \
chmod +x /usr/bin/sandbox
RUN apt-get -qq update && \
apt-get install -y \
gcc \
@@ -24,6 +17,12 @@ RUN apt-get -qq update && \
mono-runtime \
mono-mcs
ADD ./entrypoint.sh /root/entrypoint.sh
ADD ./judge.yaml /root/judge.yaml
RUN chmod +x /root/entrypoint.sh
RUN yarn global add pm2 @hydrooj/hydrojudge && \
wget https://s3.undefined.moe/file/executor-amd64 -O /usr/bin/sandbox && \
chmod +x /usr/bin/sandbox
ENTRYPOINT /root/entrypoint.sh
-3
View File
@@ -1,12 +1,9 @@
#!/bin/sh
ROOT=/root/.config/hydro
mkdir -p $ROOT
if [ ! -f "$ROOT/judge.yaml" ]; then
cp /root/judge.yaml $ROOT
fi
pm2 start sandbox
pm2-runtime start hydrojudge
+11 -1
View File
@@ -229,7 +229,17 @@ for (let i = 0; i < steps.length; i++) {
retry++;
} else log.fatal('Error when running %s', op[0]);
}
} else op[0](op[1]);
} else {
let res = 'retry';
retry = 0;
while (res === 'retry') {
if (retry < 30) {
log.warn('Retry...');
res = op[0](op[1]);
retry++;
} else log.fatal('Error installing');
}
}
}
} else log.info('已跳过该步骤 / Step skipped');
}