mirror of
https://github.com/Haxxnet/Compose-Examples
synced 2025-02-23 08:38:32 +00:00
chore: add socket-proxy for watchtower
This commit is contained in:
parent
70c24a7ece
commit
dff38311fe
|
@ -1,7 +1,7 @@
|
||||||
services:
|
services:
|
||||||
|
|
||||||
watchtower:
|
watchtower:
|
||||||
image: containrrr/watchtower:latest
|
image: containrrr/watchtower:latest
|
||||||
container_name: watchtower
|
container_name: watchtower
|
||||||
hostname: watchtower
|
hostname: watchtower
|
||||||
environment:
|
environment:
|
||||||
|
@ -16,11 +16,38 @@ services:
|
||||||
#- WATCHTOWER_MONITOR_ONLY=true
|
#- WATCHTOWER_MONITOR_ONLY=true
|
||||||
- WATCHTOWER_SCHEDULE=0 0 6 * * * # requires a go cron syntax of 6 space-separated fields; see https://containrrr.dev/watchtower/arguments/#scheduling
|
- WATCHTOWER_SCHEDULE=0 0 6 * * * # requires a go cron syntax of 6 space-separated fields; see https://containrrr.dev/watchtower/arguments/#scheduling
|
||||||
- WATCHTOWER_CLEANUP=true # remove unused images afterwards
|
- WATCHTOWER_CLEANUP=true # remove unused images afterwards
|
||||||
|
- DOCKER_HOST=tcp://socket-proxy:2375 # use socket-proxy for secure docker api access
|
||||||
restart: always
|
restart: always
|
||||||
network_mode: "host"
|
networks:
|
||||||
|
- watchtower
|
||||||
|
- proxynet
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
||||||
working_dir: /
|
working_dir: /
|
||||||
labels:
|
labels:
|
||||||
com.centurylinklabs.watchtower: true
|
com.centurylinklabs.watchtower: true
|
||||||
|
|
||||||
|
socket-proxy:
|
||||||
|
image: lscr.io/linuxserver/socket-proxy:1.26.2
|
||||||
|
container_name: socket-proxy-watchtower
|
||||||
|
environment:
|
||||||
|
- ALLOW_START=1
|
||||||
|
- ALLOW_STOP=1
|
||||||
|
- ALLOW_RESTARTS=1
|
||||||
|
- CONTAINERS=1
|
||||||
|
- IMAGES=1
|
||||||
|
- NETWORKS=1
|
||||||
|
- POST=1
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
networks:
|
||||||
|
- proxynet
|
||||||
|
restart: always
|
||||||
|
read_only: true
|
||||||
|
tmpfs:
|
||||||
|
- /run
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxynet:
|
||||||
|
internal: true
|
||||||
|
watchtower:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user