Add scripts and port mapping env vars

This commit is contained in:
Zhi
2026-03-14 07:39:17 +00:00
parent f081d53400
commit 074b5df4f5
3 changed files with 59 additions and 44 deletions

26
run-test.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Run test and cleanup afterwards
set -e
COMPOSE_FILE="docker-compose-frontend.yml"
echo "🚀 Running HarborForge Test..."
# Clean any previous containers first
docker compose -f "$COMPOSE_FILE" down 2>/dev/null || true
# Run test
docker compose -f "$COMPOSE_FILE" run --rm test
TEST_EXIT_CODE=$?
echo ""
echo "🧹 Cleaning up containers and volumes..."
docker compose -f "$COMPOSE_FILE" down -v
if [ $TEST_EXIT_CODE -eq 0 ]; then
echo "✅ Test passed!"
else
echo "❌ Test failed with exit code: $TEST_EXIT_CODE"
fi
exit $TEST_EXIT_CODE