mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
install: update
This commit is contained in:
1 parent
8d15219757
commit
215a3d07e0
5 files changed
+17
-16
No files matched your search
@@ -1,9 +1,5 @@
|
|||||||
FROM node:14
|
FROM node:14
|
||||||
|
|
||||||
ADD ./entrypoint.sh /root/entrypoint.sh
|
ADD ./entrypoint.sh /root/entrypoint.sh
|
||||||
|
|
||||||
RUN yarn global add pm2 hydrooj @hydrooj/ui-default
|
RUN yarn global add pm2 hydrooj @hydrooj/ui-default
|
||||||
|
|
||||||
RUN chmod +x /root/entrypoint.sh
|
RUN chmod +x /root/entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT /root/entrypoint.sh
|
ENTRYPOINT /root/entrypoint.sh
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
ROOT=/root/.hydro
|
ROOT=/root/.hydro
|
||||||
|
|
||||||
mkdir -p $ROOT
|
mkdir -p $ROOT
|
||||||
|
|
||||||
if [ ! -f "$ROOT/addon.json" ]; then
|
if [ ! -f "$ROOT/addon.json" ]; then
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
FROM node:14
|
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 && \
|
RUN apt-get -qq update && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
gcc \
|
gcc \
|
||||||
@@ -24,6 +17,12 @@ RUN apt-get -qq update && \
|
|||||||
mono-runtime \
|
mono-runtime \
|
||||||
mono-mcs
|
mono-mcs
|
||||||
|
|
||||||
|
ADD ./entrypoint.sh /root/entrypoint.sh
|
||||||
|
ADD ./judge.yaml /root/judge.yaml
|
||||||
RUN chmod +x /root/entrypoint.sh
|
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
|
ENTRYPOINT /root/entrypoint.sh
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
ROOT=/root/.config/hydro
|
ROOT=/root/.config/hydro
|
||||||
|
|
||||||
mkdir -p $ROOT
|
mkdir -p $ROOT
|
||||||
|
|
||||||
if [ ! -f "$ROOT/judge.yaml" ]; then
|
if [ ! -f "$ROOT/judge.yaml" ]; then
|
||||||
cp /root/judge.yaml $ROOT
|
cp /root/judge.yaml $ROOT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pm2 start sandbox
|
pm2 start sandbox
|
||||||
pm2-runtime start hydrojudge
|
pm2-runtime start hydrojudge
|
||||||
+11
-1
@@ -229,7 +229,17 @@ for (let i = 0; i < steps.length; i++) {
|
|||||||
retry++;
|
retry++;
|
||||||
} else log.fatal('Error when running %s', op[0]);
|
} 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');
|
} else log.info('已跳过该步骤 / Step skipped');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user