diff --git a/compose/authelia.yaml b/compose/authelia.yaml index ebd8870..209ed2a 100644 --- a/compose/authelia.yaml +++ b/compose/authelia.yaml @@ -9,6 +9,11 @@ services: volumes: - /opt/nextworkspace/config/authelia/:/config/ - /opt/nextworkspace/data/authelia/:/data/ + healthcheck: + test: ["CMD", "wget", "-qO-", "http://127.0.0.1:9091/api/health"] + interval: 30s + timeout: 10s + retries: 3 networks: - nextwks-net diff --git a/compose/caddy.yaml b/compose/caddy.yaml index 7e205ad..6c49ecd 100644 --- a/compose/caddy.yaml +++ b/compose/caddy.yaml @@ -11,6 +11,11 @@ services: - /opt/nextworkspace/data/caddy/:/data/ - /opt/nextworkspace/logs/caddy/:/var/log/caddy/ - /opt/nextworkspace/www/:/opt/nextworkspace/www/ + healthcheck: + test: ["CMD", "wget", "-qO-", "http://127.0.0.1:80/"] + interval: 30s + timeout: 10s + retries: 3 networks: - nextwks-net diff --git a/compose/launcher.yaml b/compose/launcher.yaml index 89604bd..b2c68a8 100644 --- a/compose/launcher.yaml +++ b/compose/launcher.yaml @@ -12,6 +12,11 @@ services: env_file: /opt/nextworkspace/.env environment: - CONFIG_DIR=/opt/nextworkspace/config/nextworkspace + healthcheck: + test: ["CMD", "wget", "-qO-", "http://127.0.0.1:9000/health"] + interval: 30s + timeout: 10s + retries: 3 networks: - nextwks-net diff --git a/deploy.sh b/deploy.sh index 56986fb..0d34577 100755 --- a/deploy.sh +++ b/deploy.sh @@ -39,8 +39,8 @@ if [ "$GREENFIELD" = true ]; then systemctl disable nextworkspace 2>/dev/null || true rm -f /etc/systemd/system/nextworkspace.service systemctl daemon-reload - # Force clean all old pods and containers - podman pod rm -f -a 2>/dev/null || true + # Force clean ALL old pods, containers, and networks + for p in $(podman pod ls -q 2>/dev/null); do podman pod rm -f "$p" 2>/dev/null || true; done podman rm -f caddy authelia launcher 2>/dev/null || true podman network rm "$NETWORK_NAME" 2>/dev/null || true