diff --git a/.github/workflows/status.yaml b/.github/workflows/status.yaml index 6bd2e30..de729db 100644 --- a/.github/workflows/status.yaml +++ b/.github/workflows/status.yaml @@ -31,8 +31,9 @@ jobs: WATCHTOWER_NOTIFICATION_URL: ${{ secrets.watchtower_notification_url }} EMAIL: ${{ secrets.caddy_email }} with: + docker_swarm: true remote_docker_host: ${{ secrets.server_address }} tailscale_ssh: true # no need for manual private and public keys upload_directory: true # upload docker directory docker_compose_directory: caddy # directory to upload - args: -p status up -d \ No newline at end of file + args: -p status --prune \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 60c0f82..b854a5c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,6 +21,28 @@ services: - config:/config networks: web: + healthcheck: + # https://ryanblunden.com/for-those-looking-for-a-http-health-check-in-alpine-images-wget-is-available-from-the-base-image-a07997be8699 + test: ["CMD", "wget", "--spider", "-q", "http://localhost"] + interval: 5s + timeout: 10s + retries: 3 + start_period: 10s + deploy: + # swarm zero-down time deployment + update_config: + delay: 5s + order: start-first + monitor: 30s + failure_action: rollback + rollback_config: + parallelism: 0 + order: stop-first + restart_policy: + condition: any + delay: 5s + max_attempts: 3 + window: 120s uptime-kuma: image: louislam/uptime-kuma:1.21.1@sha256:b302edd66b7d130f7d4b2777a212674f046909721b5a66d7c1858505a4780981 @@ -29,6 +51,21 @@ services: - /home/ubuntu/uptime-kuma:/app/data networks: web: + deploy: + # swarm zero-down time deployment + update_config: + delay: 5s + order: start-first + monitor: 4s + failure_action: rollback + rollback_config: + parallelism: 0 + order: stop-first + restart_policy: + condition: any + delay: 5s + max_attempts: 3 + window: 120s configs: Caddyfile: