Last active
March 4, 2024 10:34
-
-
Save jefftriplett/b46a3257214d2e394540fecae260edf0 to your computer and use it in GitHub Desktop.
Watchtower in Docker Compose
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
version: "3.3" | |
services: | |
web: | |
container_name: my-fancy-container | |
image: docker.pkg.github.com/jefftriplett/private-repo/private-project:latest | |
labels: | |
- "com.centurylinklabs.watchtower.enable=true" | |
- "com.centurylinklabs.watchtower.lifecycle.post-update='./post-update.sh'" | |
ports: | |
- "8000:8000" |
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
version: "3.3" | |
services: | |
watchtower: | |
container_name: watchtower | |
environment: | |
- "TZ=America/Chicago" | |
- "WATCHTOWER_CLEANUP=true" | |
- "WATCHTOWER_DEBUG=false" | |
- "WATCHTOWER_INCLUDE_STOPPED=true" | |
- "WATCHTOWER_LABEL_ENABLE=true" | |
- "WATCHTOWER_LIFECYCLE_HOOKS=true" | |
- "WATCHTOWER_POLL_INTERVAL=300" | |
- "WATCHTOWER_REVIVE_STOPPED=true" | |
image: containrrr/watchtower | |
restart: "always" | |
volumes: | |
- /root/.docker/config.json:/config.json | |
- /var/run/docker.sock:/var/run/docker.sock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment