Add reload-proxy option to deploy.sh
This commit is contained in:
parent
64f09eded2
commit
f190d0bc61
|
@ -22,6 +22,10 @@ restart)
|
|||
docker compose -f $app/docker-compose.yml restart
|
||||
done
|
||||
;;
|
||||
reload-proxy)
|
||||
docker compose -f $APPS_DIR/nginx/docker-compose.yml exec web \
|
||||
sh -c "nginx -t && nginx -s reload"
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognized argument"
|
||||
exit 1
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
{# code: language=ansible-jinja #}
|
||||
# THIS FILE IS MANAGED BY ANSIBLE
|
||||
|
||||
{
|
||||
admin off
|
||||
}
|
||||
|
||||
{% for env in ['production', 'staging'] %}
|
||||
# Environment: {{ env }}
|
||||
# BEGIN Environment: {{ env }}
|
||||
|
||||
ipfs.local.{{ proxy_vars[env].app01.apps_base_domain }} {
|
||||
tls {{ tls_email }} {
|
||||
|
@ -82,4 +78,5 @@ cloud.{{ proxy_vars[env].app01.apps_base_domain }} {
|
|||
reverse_proxy {{ proxy_vars[env].app01.internal_ipv4 }}:8080
|
||||
}
|
||||
|
||||
# END Environment: {{ env }}
|
||||
{% endfor %}
|
||||
|
|
|
@ -18,4 +18,4 @@ services:
|
|||
- net_bind_service
|
||||
- dac_override
|
||||
cap_drop:
|
||||
- all
|
||||
- all
|
||||
|
|
|
@ -16,6 +16,12 @@ stop)
|
|||
restart)
|
||||
docker compose -f $PROXY_DIR/docker-compose.yml restart
|
||||
;;
|
||||
reload-proxy)
|
||||
CADDYFILE="/etc/caddy/Caddyfile"
|
||||
docker compose -f $PROXY_DIR/docker-compose.yml exec caddy \
|
||||
sh -c "caddy validate -c $CADDYFILE && caddy reload -c $CADDYFILE" \
|
||||
2>/dev/null
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognized argument"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in a new issue