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

View file

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