mirror of
https://github.com/hexastack/hexabot
synced 2024-11-22 09:38:13 +00:00
fix: nginx autoreload
This commit is contained in:
parent
6955a09536
commit
9989c1b199
@ -8,7 +8,7 @@ services:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ./nginx/certbot/conf:/etc/letsencrypt
|
||||
- ./nginx/certbot/www:/var/www/certbot
|
||||
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
|
||||
- ./nginx/99-autoreload.sh:/docker-entrypoint.d/99-autoreload.sh
|
||||
|
||||
certbot:
|
||||
image: certbot/certbot
|
||||
|
6
docker/nginx/99-autoreload.sh
Normal file
6
docker/nginx/99-autoreload.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
while :; do
|
||||
# Optional: Instead of sleep, detect config changes and only reload if necessary.
|
||||
sleep 6h
|
||||
nginx -t && nginx -s reload
|
||||
done &
|
Loading…
Reference in New Issue
Block a user