fix(ops): exact container name matching in verify-server.sh
Some checks failed
Some checks failed
Use regex pattern [-]name-[0-9] to avoid redis matching redis-exporter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -234,7 +234,7 @@ if [ "$MODE" = "prod" ]; then
|
|||||||
|
|
||||||
EXPECTED_CONTAINERS="db redis api celery-worker celery-beat flower prometheus grafana node-exporter cadvisor alertmanager redis-exporter"
|
EXPECTED_CONTAINERS="db redis api celery-worker celery-beat flower prometheus grafana node-exporter cadvisor alertmanager redis-exporter"
|
||||||
for name in $EXPECTED_CONTAINERS; do
|
for name in $EXPECTED_CONTAINERS; do
|
||||||
container=$(docker compose --profile full --project-directory "$ORION_DIR" ps --format '{{.Name}}' 2>/dev/null | grep "$name" || true)
|
container=$(docker compose --profile full --project-directory "$ORION_DIR" ps --format '{{.Name}}' 2>/dev/null | grep -E "[-]${name}-[0-9]" || true)
|
||||||
if [ -n "$container" ]; then
|
if [ -n "$container" ]; then
|
||||||
state=$(docker inspect --format='{{.State.Status}}' "$container" 2>/dev/null || echo "unknown")
|
state=$(docker inspect --format='{{.State.Status}}' "$container" 2>/dev/null || echo "unknown")
|
||||||
if [ "$state" = "running" ]; then
|
if [ "$state" = "running" ]; then
|
||||||
@@ -249,7 +249,7 @@ if [ "$MODE" = "prod" ]; then
|
|||||||
|
|
||||||
# Check for healthy status on containers with healthchecks
|
# Check for healthy status on containers with healthchecks
|
||||||
for name in db redis api celery-worker; do
|
for name in db redis api celery-worker; do
|
||||||
container=$(docker compose --profile full --project-directory "$ORION_DIR" ps --format '{{.Name}}' 2>/dev/null | grep "$name" || true)
|
container=$(docker compose --profile full --project-directory "$ORION_DIR" ps --format '{{.Name}}' 2>/dev/null | grep -E "[-]${name}-[0-9]" || true)
|
||||||
if [ -n "$container" ]; then
|
if [ -n "$container" ]; then
|
||||||
health=$(docker inspect --format='{{.State.Health.Status}}' "$container" 2>/dev/null || echo "none")
|
health=$(docker inspect --format='{{.State.Health.Status}}' "$container" 2>/dev/null || echo "none")
|
||||||
if [ "$health" = "healthy" ]; then
|
if [ "$health" = "healthy" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user