add watchtower to docker-compose and .env and gitea actions
Build and Push Docker Image / build-and-push (push) Successful in 2m10s

This commit is contained in:
2026-06-11 19:52:20 +01:00
parent 602343fd9f
commit 79dd76ecc7
3 changed files with 30 additions and 2 deletions
+19 -1
View File
@@ -1,8 +1,13 @@
services:
app:
build: .
image: ${DOCKERHUB_USERNAME}/calendarreminder-app:latest
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
labels:
- "com.centurylinklabs.watchtower.enable=true"
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ConnectionStrings__Default=Server=${DB_SERVER};Port=${DB_PORT};Database=${DB_NAME};User=${DB_USER};Password=${DB_PASSWORD};
@@ -32,3 +37,16 @@ services:
timeout: 5s
retries: 5
restart: unless-stopped
watchtower:
image: containrrr/watchtower
ports:
- "8085:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WATCHTOWER_LABEL_ENABLE=true
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_HTTP_API_UPDATE=true
- WATCHTOWER_HTTP_API_TOKEN=${WATCHTOWER_TOKEN}
restart: unless-stopped