测试 overlay

This commit is contained in:
whyour 2024-07-31 23:41:24 +08:00
parent a743aa8115
commit 59f024b663
15 changed files with 99 additions and 1 deletions

View File

@ -7,6 +7,7 @@ on:
branches:
- "master"
- "develop"
- "test-overlay"
tags:
- "v*"
schedule:

View File

@ -76,7 +76,30 @@ COPY --from=builder /tmp/build/node_modules/. /ql/node_modules/
WORKDIR ${QL_DIR}
ENV S6_VERSION=v3.2.0.0
RUN ARCH=$(uname -m) && \
case "$ARCH" in \
x86_64) ARCH="amd64" ;; \
aarch64) ARCH="aarch64" ;; \
armv6l) ARCH="arm" ;; \
armv7l) ARCH="armhf" ;; \
i386) ARCH="x86" ;; \
s390x) ARCH="s390x" ;; \
ppc64le) ARCH="powerpc64le" ;; \
*) echo "unsupported architecture"; exit 1 ;; \
esac && \
S6_OVERLAY_URL=https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-${ARCH}.tar.xz && \
apk add --no-cache curl && \
curl -L $S6_OVERLAY_URL -o /tmp/s6-overlay.tar.xz && \
tar -C / -Jxpf /tmp/s6-overlay.tar.xz
COPY docker/s6-rc.d /etc/s6-overlay/s6-rc.d/
RUN chmod +x /etc/s6-overlay/s6-rc.d/*/run && \
chmod +x /etc/s6-overlay/s6-rc.d/*/finish
HEALTHCHECK --interval=5s --timeout=2s --retries=20 \
CMD curl -sf --noproxy '*' http://127.0.0.1:5400/api/health || exit 1
ENTRYPOINT ["./docker/docker-entrypoint.sh"]
ENTRYPOINT ["/init"]

View File

@ -0,0 +1,2 @@
#!/command/execlineb -P
echo "finish crond"

2
docker/s6-rc.d/crond/run Normal file
View File

@ -0,0 +1,2 @@
#!/command/execlineb -P
crond -f

View File

@ -0,0 +1,2 @@
#!/command/execlineb -P
echo "finish ngnix"

12
docker/s6-rc.d/nginx/run Normal file
View File

@ -0,0 +1,12 @@
#!/command/execlineb -P
dir_shell=/ql/shell
. $dir_shell/share.sh
. $dir_shell/env.sh
import_config "$@"
make_dir /etc/nginx/conf.d
make_dir /run/nginx
init_nginx
fix_config
nginx -g "daemon off;"

View File

@ -0,0 +1,2 @@
#!/command/execlineb -P
echo "finish panel"

12
docker/s6-rc.d/panel/run Normal file
View File

@ -0,0 +1,12 @@
#!/command/execlineb -P
dir_shell=/ql/shell
. $dir_shell/share.sh
. $dir_shell/env.sh
import_config "$@"
make_dir /etc/nginx/conf.d
make_dir /run/nginx
init_nginx
fix_config
node ${dir_static}/build/app.js

View File

@ -0,0 +1,2 @@
#!/command/execlineb -P
echo "finish public"

View File

@ -0,0 +1,12 @@
#!/command/execlineb -P
dir_shell=/ql/shell
. $dir_shell/share.sh
. $dir_shell/env.sh
import_config "$@"
make_dir /etc/nginx/conf.d
make_dir /run/nginx
init_nginx
fix_config
node ${dir_static}/build/public.js

View File

@ -0,0 +1,2 @@
#!/command/execlineb -P
echo "finish schedule"

View File

@ -0,0 +1,12 @@
#!/command/execlineb -P
dir_shell=/ql/shell
. $dir_shell/share.sh
. $dir_shell/env.sh
import_config "$@"
make_dir /etc/nginx/conf.d
make_dir /run/nginx
init_nginx
fix_config
node ${dir_static}/build/schedule/index.js

View File

@ -0,0 +1,2 @@
#!/command/execlineb -P
echo "finish update"

12
docker/s6-rc.d/update/run Normal file
View File

@ -0,0 +1,12 @@
#!/command/execlineb -P
dir_shell=/ql/shell
. $dir_shell/share.sh
. $dir_shell/env.sh
import_config "$@"
make_dir /etc/nginx/conf.d
make_dir /run/nginx
init_nginx
fix_config
node ${dir_static}/build/update.js