diff --git a/backend/deploy/helm/templates/migrate-job.yaml b/backend/deploy/helm/templates/migrate-job.yaml index 26155a9..ed5c586 100644 --- a/backend/deploy/helm/templates/migrate-job.yaml +++ b/backend/deploy/helm/templates/migrate-job.yaml @@ -34,7 +34,7 @@ spec: initContainers: # Wait for CNPG to provision the cluster and secret before migrating - name: wait-for-postgres - image: busybox:1.37 + image: alpine:3.21 resources: requests: cpu: 10m @@ -52,7 +52,7 @@ spec: - -c - | echo "Waiting for PostgreSQL..." - until nc -w 2 "$DB_HOST" "$DB_PORT" < /dev/null; do + until nc -z -w 2 "$DB_HOST" "$DB_PORT" 2>/dev/null; do sleep 3 done echo "PostgreSQL is reachable"