Last active
September 20, 2019 13:40
-
-
Save mochja/b5ab530770966d6dd21cc9996fe2da83 to your computer and use it in GitHub Desktop.
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
[Unit] | |
Description=Update nginx config on docker container restart | |
After=docker.service | |
[Service] | |
Type=simple | |
ExecStart=/root/dokku-update-nginx-on-container-restart.sh | |
Restart=on-failure | |
RestartSec=5s | |
[Install] | |
WantedBy=multi-user.target | |
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
#!/bin/bash | |
docker events --filter "org.label-schema.vendor=dokku" --filter "event=restart" --format "{{index .Actor.Attributes \"com.dokku.app-name\"}}" | xargs -L1 -I % dokku nginx:build-config % -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment