Last active
December 3, 2018 15:59
-
-
Save teodorescuserban/a8d4f325329dad717acc104e1e710b1f to your computer and use it in GitHub Desktop.
tricking a s6-overlay driven nginx in docker to gracefully shutdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assuming the service is called nginx, | |
# to stop it gracefully | |
docker exec -it <container> | |
s6-svc -o /var/run/s6/services/nginx # puts the service in "run-once" mode | |
s6-svc -q /var/run/s6/services/nginx # sends the SIGQUIT signal required bby nginx for a graceful shutdown | |
# to start the service again | |
s6-svc -u /var/run/s6/services/nginx # puts the service back up in "run-always" mode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment