Compare commits

...

5 Commits

Author SHA1 Message Date
david
6c1211708c v1.10.17 2020-12-22 12:04:59 +08:00
david
40387fdb5b + push.sh 2020-12-22 12:03:11 +08:00
david
e10c36295c 优化Dockerfile防止更新权限覆盖 2020-12-22 01:19:45 +08:00
david
801d7b016f 优化entrypoint.sh脚本 2020-12-22 01:14:40 +08:00
david
1ff415ea91 && chmod -R 777 /IYUU/docker/entrypoint.sh \ 2020-12-22 00:24:35 +08:00
6 changed files with 16 additions and 7 deletions

View File

@@ -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 ----------
@@ -81,6 +81,8 @@ RUN set -ex \
&& git clone https://gitee.com/ledc/IYUUAutoReseed.git /IYUU \
&& cp /IYUU/config/config.sample.php /IYUU/config/config.php \
&& ln -sf /IYUU/config/config.php /config.php \
&& cp /IYUU/docker/entrypoint.sh /entrypoint.sh \
&& chmod -R 777 /entrypoint.sh \
&& apk del --purge *-dev \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man /usr/share/php7 \
# ---------- some config,clear work ----------
@@ -109,4 +111,4 @@ RUN set -ex \
# EXPOSE 9000
# VOLUME ["/IYUU", "/data"]
WORKDIR /IYUU
ENTRYPOINT ["/IYUU/docker/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -13,7 +13,7 @@ use IYUU\Library\Table;
class AutoReseed
{
// 版本号
const VER = '1.10.16';
const VER = '1.10.17';
// RPC连接
private static $links = [];
// 客户端配置

View File

@@ -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 ----------
@@ -81,6 +81,8 @@ RUN set -ex \
&& git clone https://gitee.com/ledc/IYUUAutoReseed.git /IYUU \
&& cp /IYUU/config/config.sample.php /IYUU/config/config.php \
&& ln -sf /IYUU/config/config.php /config.php \
&& cp /IYUU/docker/entrypoint.sh /entrypoint.sh \
&& chmod -R 777 /entrypoint.sh \
&& apk del --purge *-dev \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man /usr/share/php7 \
# ---------- some config,clear work ----------
@@ -109,4 +111,4 @@ RUN set -ex \
# EXPOSE 9000
# VOLUME ["/IYUU", "/data"]
WORKDIR /IYUU
ENTRYPOINT ["/IYUU/docker/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -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 \
@@ -17,6 +17,8 @@ RUN set -ex \
&& git clone https://gitee.com/ledc/IYUUAutoReseed.git /IYUU \
&& cp /IYUU/config/config.sample.php /IYUU/config/config.php \
&& ln -sf /IYUU/config/config.php /config.php \
&& cp /IYUU/docker/entrypoint.sh /entrypoint.sh \
&& chmod -R 777 /entrypoint.sh \
&& apk del --purge *-dev \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man \
&& echo "${TZ}" > /etc/timezone \
@@ -27,4 +29,4 @@ RUN set -ex \
&& echo -e "\033[42;37m Build Completed :).\033[0m\n"
WORKDIR /IYUU
ENTRYPOINT ["/IYUU/docker/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]

2
docker/Arm64v8/push.sh Normal file
View File

@@ -0,0 +1,2 @@
docker image tag iyuu:arm64v8 iyuucn/iyuuautoreseed:arm64v8
docker image push iyuucn/iyuuautoreseed:arm64v8

View File

@@ -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