Add entrypoint script for better container startup and debugging
Some checks failed
Deploy Production Email Reports (Unified) / deploy (push) Failing after 18s

This commit is contained in:
Frank John Begornia
2026-01-02 01:44:36 +08:00
parent 0f75206307
commit afa05d272e
3 changed files with 61 additions and 4 deletions

View File

@@ -105,8 +105,21 @@ jobs:
echo "Starting unified container (env vars from .env file)"
docker compose up -d
echo "Waiting for container to start"
sleep 10
echo "Waiting for container to start (30 seconds)..."
sleep 5
# Check if container is running or restarting
CONTAINER_STATE=$(docker inspect --format='{{.State.Status}}' email_reports_unified 2>/dev/null || echo "not_found")
echo "Container state: $CONTAINER_STATE"
if [ "$CONTAINER_STATE" = "restarting" ]; then
echo "Container is restarting - showing logs:"
docker logs email_reports_unified
exit 1
fi
# Wait a bit more for initialization
sleep 25
if docker ps --format '{{.Names}}' | grep -q email_reports_unified; then
echo "✓ Container is running"