Some checks failed
CI / test-and-build (push) Failing after 25s
Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
743 B
Bash
27 lines
743 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd ~/games_app
|
|
|
|
echo "== migrate =="
|
|
sudo docker compose run --rm --no-deps --build backend node dist/db/migrate.js
|
|
echo "MIGRATE_OK"
|
|
|
|
echo "== compose up (http + clamav) =="
|
|
sudo docker compose --profile http --profile clamav up -d --build
|
|
echo "COMPOSE_UP_OK"
|
|
|
|
echo "== ps =="
|
|
sudo docker compose ps
|
|
|
|
echo "== smoke health (wait) =="
|
|
for i in $(seq 1 30); do
|
|
if curl -fsS -o /dev/null -w "%{http_code}" http://127.0.0.1:9080/api/health 2>/dev/null | grep -qE '200|404|401'; then
|
|
echo "HTTP_REACHABLE"
|
|
curl -fsS http://127.0.0.1:9080/api/health || curl -fsS http://127.0.0.1:9080/health || true
|
|
break
|
|
fi
|
|
sleep 3
|
|
done
|
|
sudo docker compose logs --tail=40 backend || true
|
|
echo "STACK_DONE"
|