Add entrypoint script for better container startup and debugging
Some checks failed
Deploy Production Email Reports (Unified) / deploy (push) Failing after 18s
Some checks failed
Deploy Production Email Reports (Unified) / deploy (push) Failing after 18s
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user