fixed nats healthcheck
All checks were successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful

This commit is contained in:
Stephan D
2025-11-07 16:19:32 +01:00
parent 49cdd8cbee
commit 77aaea8b3d
3 changed files with 12 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
FROM docker.io/library/busybox:1.36.1-musl AS busybox
FROM docker.io/library/nats:latest
COPY --from=busybox /bin/busybox /bin/busybox
COPY --from=busybox /bin/sh /bin/sh
COPY --from=busybox /bin/wget /bin/wget

View File

@@ -15,7 +15,9 @@ networks:
services:
sendico_nats:
<<: *common-env
image: docker.io/library/nats:latest
build:
context: .
dockerfile: Dockerfile.nats
container_name: sendico-nats
restart: unless-stopped
command:
@@ -34,7 +36,7 @@ services:
- "0.0.0.0:${NATS_PORT}:${NATS_PORT}"
- "0.0.0.0:${NATS_MONITORING_PORT}:${NATS_MONITORING_PORT}"
healthcheck:
test: wget http://localhost:8222/healthz -q -S -O -
test: wget http://localhost:${NATS_MONITORING_PORT}/healthz -q -S -O -
start_period: 3s
retries: 3
timeout: 3s

View File

@@ -30,6 +30,7 @@ RSYNC_FLAGS=(-az --delete)
ssh "${SSH_OPTS[@]}" "$REMOTE_TARGET" "mkdir -p ${REMOTE_DIR}/{compose,env}"
rsync "${RSYNC_FLAGS[@]}" -e "ssh ${SSH_OPTS[*]}" ci/prod/compose/nats.yml "$REMOTE_TARGET:${REMOTE_DIR}/compose/nats.yml"
rsync "${RSYNC_FLAGS[@]}" -e "ssh ${SSH_OPTS[*]}" ci/prod/compose/Dockerfile.nats "$REMOTE_TARGET:${REMOTE_DIR}/compose/Dockerfile.nats"
rsync "${RSYNC_FLAGS[@]}" -e "ssh ${SSH_OPTS[*]}" ci/prod/.env.runtime "$REMOTE_TARGET:${REMOTE_DIR}/env/.env.runtime"
ssh "${SSH_OPTS[@]}" "$REMOTE_TARGET" \
@@ -48,6 +49,7 @@ export COMPOSE_PROJECT_NAME
export NATS_USER NATS_PASSWORD
docker compose -f nats.yml pull --quiet 2>/dev/null || docker compose -f nats.yml pull
docker compose -f nats.yml build sendico_nats
docker compose -f nats.yml up -d --remove-orphans
docker compose -f nats.yml ps