mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-24 08:30:26 +00:00
proxy migration
This commit is contained in:
parent
c31ab23568
commit
2e9b6c1634
8 changed files with 34 additions and 15 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@ logs
|
|||
.pytest_cache
|
||||
.apphub/swagger-ui
|
||||
.apphub/apphub.egg-info
|
||||
cli/__pycache__
|
|
@ -1,13 +1,18 @@
|
|||
# modify time: 202310241700, you can modify here to trigger Docker Build action
|
||||
# Dockerfile refer to:https://github.com/NginxProxyManager/nginx-proxy-manager/blob/develop/docker/Dockerfile
|
||||
# modify time: 202310251532, you can modify here to trigger Docker Build action
|
||||
# from Dockerfile: https://github.com/NginxProxyManager/nginx-proxy-manager/blob/develop/docker/Dockerfile
|
||||
# from image: https://hub.docker.com/r/jc21/nginx-proxy-manager
|
||||
|
||||
FROM jc21/nginx-proxy-manager:2.10.4
|
||||
|
||||
LABEL maintainer="Websoft9<help@websoft9.com>"
|
||||
LABEL version="2.10.4"
|
||||
|
||||
RUN apt-get update && apt-get install -y curl jq
|
||||
COPY ./config/initproxy.conf /data/nginx/proxy_host/
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y curl jq && rm -rf /var/lib/apt/lists/*
|
||||
COPY ./config/initproxy.conf /etc/
|
||||
|
||||
COPY ./s6/init_user/init_user.sh /app/init_user.sh
|
||||
RUN chmod +x /app/init_user.sh
|
||||
CMD ["/bin/sh", "-c", "/app/init_user.sh && tail -f /dev/null"]
|
||||
COPY ./s6/w9init/setuser.sh /app/setuser.sh
|
||||
COPY ./s6/w9init/migration.sh /app/migration.sh
|
||||
|
||||
RUN chmod +x /app/setuser.sh /app/migration.sh
|
||||
|
||||
CMD ["/bin/sh", "-c", "/app/migration.sh && /app/setuser.sh && tail -f /dev/null"]
|
3
docker/proxy/s6/README.md
Normal file
3
docker/proxy/s6/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# S6
|
||||
|
||||
S6 is a mulitply process management tools at Nginx Proxy Manager.
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
[[ -f ./init_user.sh ]] && source ./init_user.sh
|
||||
pushd /root >/dev/null
|
||||
exec s6-svc -D /etc/s6-overlay/s6-rc.d/init_user
|
||||
popd
|
|
@ -1 +0,0 @@
|
|||
oneshot
|
17
docker/proxy/s6/w9init/migration.sh
Normal file
17
docker/proxy/s6/w9init/migration.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
set +e
|
||||
|
||||
nginx_proxy(){
|
||||
if [ $(stat -c %Y /etc/shadow) -gt $(stat -c %Y /data/nginx/proxy_host/initproxy.conf) ]
|
||||
then
|
||||
cp /etc/initproxy.conf /data/nginx/proxy_host/
|
||||
echo "Update initproxy.conf to Nginx"
|
||||
else
|
||||
echo "Don't need to update initproxy.conf to Nginx"
|
||||
fi
|
||||
}
|
||||
|
||||
nginx_proxy
|
||||
|
||||
set -e
|
Loading…
Reference in a new issue