inital commit
This commit is contained in:
commit
34ad0298e5
8
.env.sample
Normal file
8
.env.sample
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
PROJECT_URL=watchtower.localhost
|
||||||
|
|
||||||
|
PROJECT_NAME=sample
|
||||||
|
|
||||||
|
TRAEFIK_NETWORK=traefik_net
|
||||||
|
|
||||||
|
GOTIFY_URL=gotify.localhost
|
||||||
|
GOTIFY_TOKEN=YOUR_GENERATED_GOTIFY_TOKEN
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.env
|
20
README.md
Normal file
20
README.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# traefik watchtower
|
||||||
|
|
||||||
|
### get started
|
||||||
|
|
||||||
|
generate a token in your gotify and create a .env file
|
||||||
|
|
||||||
|
sample .env:
|
||||||
|
|
||||||
|
# .env
|
||||||
|
|
||||||
|
PROJECT_URL=watchtower.localhost
|
||||||
|
PROJECT_NAME=sample
|
||||||
|
|
||||||
|
GOTIFY_URL=gotify.localhost
|
||||||
|
GOTIFY_TOKEN=YOUR_GENERATED_GOTIFY_TOKEN
|
||||||
|
|
||||||
|
# the traefik network you want to use
|
||||||
|
TRAEFIK_NETWORK=traefik_net
|
||||||
|
|
||||||
|
then execute the first time the init script
|
39
docker-compose.yml
Normal file
39
docker-compose.yml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
version: '1'
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
name: "${TRAEFIK_NETWORK}"
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
watchtower:
|
||||||
|
image: "containrrr/watchtower"
|
||||||
|
container_name: "${PROJECT_NAME}_watchtower"
|
||||||
|
hostname: "${PROJECT_URL}"
|
||||||
|
restart: "unless-stopped"
|
||||||
|
environment:
|
||||||
|
- "WATCHTOWER_NOTIFICATIONS=gotify"
|
||||||
|
- "WATCHTOWER_NOTIFICATION_GOTIFY_URL=http://${GOTIFY_URL}"
|
||||||
|
- "WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN=${GOTIFY_TOKEN}"
|
||||||
|
- "WATCHTOWER_CLEANUP=true"
|
||||||
|
- "WATCHTOWER_LABEL_ENABLE=true"
|
||||||
|
- "WATCHTOWER_INCLUDE_RESTARTING=true"
|
||||||
|
- "WATCHTOWER_ROLLING_RESTARTING=true"
|
||||||
|
- "WATCHTOWER_INTERVAL=200"
|
||||||
|
- "WATCHTOWER_INCLUDE_STOPPED=true"
|
||||||
|
security_opt:
|
||||||
|
- "no-new-privileges:true"
|
||||||
|
volumes:
|
||||||
|
- "/etc/timezone:/etc/timezone:ro"
|
||||||
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
labels:
|
||||||
|
# Watchtower add to auto update
|
||||||
|
- "com.centurylinklabs.watchtower.enable=true"
|
||||||
|
# traefik
|
||||||
|
- "traefikf.enable=true"
|
||||||
|
- "traefik.docker.network=${TRAEFIK_NETWORK}"
|
||||||
|
- "traefik.http.routers.${PROJECT_NAME}_watchtower.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.${PROJECT_NAME}_watchtower.rule=Host(`${PROJECT_URL}`)"
|
||||||
|
- "traefik.http.routers.${PROJECT_NAME}_watchtower.tls=true"
|
||||||
|
- "traefik.http.services.${PROJECT_NAME}_watchtower.loadbalancer.server.port=3000"
|
Loading…
Reference in New Issue
Block a user