use watchtower scope

This commit is contained in:
Arul Agrawal 2022-02-01 12:05:18 +04:00
parent 597bdfb23d
commit 18f99744c1
No known key found for this signature in database
GPG key ID: D16A92BEDB48284C
3 changed files with 34 additions and 12 deletions

0
configure-instance.sh Executable file → Normal file
View file

View file

@ -5,15 +5,17 @@ services:
depends_on: depends_on:
- piped - piped
container_name: piped-frontend container_name: piped-frontend
entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g "daemon off;"'
/usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g labels:
"daemon off;"' com.centurylinklabs.watchtower.scope: piped
ytproxy: ytproxy:
image: 1337kavin/ytproxy:latest image: 1337kavin/ytproxy:latest
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ytproxy:/app/socket - ytproxy:/app/socket
container_name: ytproxy container_name: ytproxy
labels:
com.centurylinklabs.watchtower.scope: piped
piped: piped:
image: 1337kavin/piped:latest image: 1337kavin/piped:latest
restart: unless-stopped restart: unless-stopped
@ -22,6 +24,8 @@ services:
depends_on: depends_on:
- postgres - postgres
container_name: piped-backend container_name: piped-backend
labels:
com.centurylinklabs.watchtower.scope: piped
varnish: varnish:
image: varnish:7.0-alpine image: varnish:7.0-alpine
restart: unless-stopped restart: unless-stopped
@ -31,11 +35,12 @@ services:
depends_on: depends_on:
- piped - piped
healthcheck: healthcheck:
test: ash -c "wget --no-verbose --tries=1 --spider 127.0.0.1:80/feed || test: ash -c "wget --no-verbose --tries=1 --spider 127.0.0.1:80/feed || (varnishreload && exit 1)"
(varnishreload && exit 1)"
interval: 10s interval: 10s
timeout: 10s timeout: 10s
retries: 1 retries: 1
labels:
com.centurylinklabs.watchtower.scope: piped
caddy: caddy:
image: caddy:2-alpine image: caddy:2-alpine
restart: unless-stopped restart: unless-stopped
@ -48,6 +53,8 @@ services:
- caddy_data:/data - caddy_data:/data
- ytproxy:/var/run/ytproxy - ytproxy:/var/run/ytproxy
container_name: caddy container_name: caddy
labels:
com.centurylinklabs.watchtower.scope: piped
postgres: postgres:
image: postgres:13-alpine image: postgres:13-alpine
restart: unless-stopped restart: unless-stopped
@ -58,6 +65,8 @@ services:
- POSTGRES_USER=piped - POSTGRES_USER=piped
- POSTGRES_PASSWORD=changeme - POSTGRES_PASSWORD=changeme
container_name: postgres container_name: postgres
labels:
com.centurylinklabs.watchtower.scope: piped
watchtower: watchtower:
image: containrrr/watchtower image: containrrr/watchtower
restart: always restart: always
@ -68,7 +77,9 @@ services:
- WATCHTOWER_CLEANUP=true - WATCHTOWER_CLEANUP=true
- WATCHTOWER_INCLUDE_RESTARTING=true - WATCHTOWER_INCLUDE_RESTARTING=true
container_name: watchtower container_name: watchtower
command: piped-frontend piped-backend ytproxy varnish caddy postgres watchtower command: --scope piped
labels:
com.centurylinklabs.watchtower.scope: piped
volumes: volumes:
caddy_data: null caddy_data: null
ytproxy: null ytproxy: null

View file

@ -5,15 +5,17 @@ services:
depends_on: depends_on:
- piped - piped
container_name: piped-frontend container_name: piped-frontend
entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g "daemon off;"'
/usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g labels:
"daemon off;"' com.centurylinklabs.watchtower.scope: piped
ytproxy: ytproxy:
image: 1337kavin/ytproxy:latest image: 1337kavin/ytproxy:latest
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ytproxy:/app/socket - ytproxy:/app/socket
container_name: ytproxy container_name: ytproxy
labels:
com.centurylinklabs.watchtower.scope: piped
piped: piped:
image: 1337kavin/piped:latest image: 1337kavin/piped:latest
restart: unless-stopped restart: unless-stopped
@ -22,6 +24,8 @@ services:
depends_on: depends_on:
- postgres - postgres
container_name: piped-backend container_name: piped-backend
labels:
com.centurylinklabs.watchtower.scope: piped
varnish: varnish:
image: varnish:7.0-alpine image: varnish:7.0-alpine
restart: unless-stopped restart: unless-stopped
@ -31,11 +35,12 @@ services:
depends_on: depends_on:
- piped - piped
healthcheck: healthcheck:
test: ash -c "wget --no-verbose --tries=1 --spider 127.0.0.1:80/feed || test: ash -c "wget --no-verbose --tries=1 --spider 127.0.0.1:80/feed || (varnishreload && exit 1)"
(varnishreload && exit 1)"
interval: 10s interval: 10s
timeout: 10s timeout: 10s
retries: 1 retries: 1
labels:
com.centurylinklabs.watchtower.scope: piped
nginx: nginx:
image: nginx:mainline-alpine image: nginx:mainline-alpine
restart: unless-stopped restart: unless-stopped
@ -54,6 +59,8 @@ services:
- varnish - varnish
- ytproxy - ytproxy
- pipedfrontend - pipedfrontend
labels:
com.centurylinklabs.watchtower.scope: piped
postgres: postgres:
image: postgres:13-alpine image: postgres:13-alpine
restart: unless-stopped restart: unless-stopped
@ -64,6 +71,8 @@ services:
- POSTGRES_USER=piped - POSTGRES_USER=piped
- POSTGRES_PASSWORD=changeme - POSTGRES_PASSWORD=changeme
container_name: postgres container_name: postgres
labels:
com.centurylinklabs.watchtower.scope: piped
watchtower: watchtower:
image: containrrr/watchtower image: containrrr/watchtower
restart: always restart: always
@ -74,6 +83,8 @@ services:
- WATCHTOWER_CLEANUP=true - WATCHTOWER_CLEANUP=true
- WATCHTOWER_INCLUDE_RESTARTING=true - WATCHTOWER_INCLUDE_RESTARTING=true
container_name: watchtower container_name: watchtower
command: piped-frontend piped-backend ytproxy varnish nginx postgres watchtower command: --scope piped
labels:
com.centurylinklabs.watchtower.scope: piped
volumes: volumes:
ytproxy: null ytproxy: null