forked from Skill17-WebTechnologies/competition-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwatchtower.yaml
More file actions
35 lines (34 loc) · 1.07 KB
/
watchtower.yaml
File metadata and controls
35 lines (34 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
services:
docker-login:
image: "docker:latest"
container_name: "docker-login"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./config/watchtower:/root/.docker"
entrypoint: >
sh -c "
echo 'Logging in to Docker registry...';
docker login git.${DOMAIN} -u ${USERNAME} -p ${PASSWORD};
echo 'Docker login complete.'
"
watchtower:
image: containrrr/watchtower
container_name: watchtower
restart: always
networks:
- gitea
environment:
- DOCKER_TLS_VERIFY=0
- SSL_CERT_FILE=/etc/ssl/cert.pem
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./config/watchtower/config.json:/config.json
- ./config/traefik/certs/ca-cert.crt:/etc/ssl/cert.pem
command: --interval 10 --cleanup --include-stopped --revive-stopped --label-enable
labels:
- "traefik.enable=true"
- "traefik.http.routers.watchtower.rule=HostRegexp(`{_:watchtower\\..*}`)"
- "traefik.http.services.watchtower.loadbalancer.server.port=8080"
networks:
gitea:
external: true