优化entrypoint.sh脚本

master
david 4 years ago
parent 1ff415ea91
commit 801d7b016f
  1. 2
      Dockerfile
  2. 2
      docker/AMD64/Dockerfile
  3. 2
      docker/Arm64v8/Dockerfile
  4. 1
      docker/entrypoint.sh

@ -19,7 +19,7 @@ ARG app_env=prod
ENV APP_ENV=${app_env:-"prod"} \
TIMEZONE=${timezone:-"Asia/Shanghai"} \
cron="3 11 * * *"
cron="3 */10 * * *"
##
# ---------- building ----------

@ -19,7 +19,7 @@ ARG app_env=prod
ENV APP_ENV=${app_env:-"prod"} \
TIMEZONE=${timezone:-"Asia/Shanghai"} \
cron="3 11 * * *"
cron="3 */10 * * *"
##
# ---------- building ----------

@ -4,7 +4,7 @@ FROM arm64v8/alpine:3.12
ENV TZ Asia/Shanghai
ENV cron="3 15 * * *"
ENV cron="3 */10 * * *"
RUN set -ex \
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories \

@ -3,5 +3,6 @@ DEFAULT_CRON="9 */6 * * *"
cron=${cron:-$DEFAULT_CRON}
set -e
echo "$cron /usr/bin/php /IYUU/iyuu.php" | crontab -
cd /IYUU && git fetch --all && git reset --hard origin/master
/usr/bin/php /IYUU/iyuu.php
/usr/sbin/crond -f

Loading…
Cancel
Save