switch to hybrid

This commit is contained in:
aptalca 2022-08-18 13:17:14 -04:00
parent 4e623d51b1
commit 0fdef6eebd
6 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/usr/bin/with-contenv bash
if [ ! -S /var/run/docker.sock ] && [ -z "$DOCKER_HOST" ]; then
echo "**** Docker mod not set up properly, skipping SWAG auto-proxy ****"
exit 0
fi
rm -rf /etc/nginx/http.d/auto-proxy*.conf /config/nginx/proxy-confs/auto-proxy*.conf
sed -i 's|#include /etc/nginx/http.d|include /etc/nginx/http.d|' /config/nginx/nginx.conf
cp /defaults/auto-proxy-readme /etc/nginx/http.d/auto-proxy-readme
rm -rf /auto-proxy
mkdir /auto-proxy
if ! grep -q "/app/auto-proxy.sh" /config/crontabs/root; then
echo "* * * * * /app/auto-proxy.sh" >> /config/crontabs/root
cp /config/crontabs/root /etc/crontabs/root
fi
/app/auto-proxy.sh

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-mod-swag-auto-proxy-setup/run