Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion templates/base/sandbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ set -e
echo "🔒 Initializing AI Sandbox with Pipelock Egress Firewall..."

# Start supporting services (database, migrations, backend, and pipelock firewall)
docker compose -f docker-compose.yml -f docker-compose.sandbox.yml up -d db migration backend pipelock
docker compose -f docker-compose.yml -f docker-compose.sandbox.yml up -d --wait db migration backend pipelock
"$(dirname "${BASH_SOURCE[0]}")/urls.sh"

# Ensure backend Python dependencies are installed in the sandbox venv if python backend exists
if [ -f backend/requirements.txt ]; then
Expand Down
10 changes: 1 addition & 9 deletions templates/base/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,7 @@ docker compose up -d --build --wait "${PASS_ARGS[@]}" || {
exit 1
}

FRONTEND_URL="http://localhost:${FRONTEND_PORT:-3000}"
BACKEND_URL="http://localhost:${BACKEND_PORT:-8000}"

echo ""
echo "✅ Fullstack services are up and running:"
echo " • Frontend: $FRONTEND_URL"
echo " • Backend: $BACKEND_URL"
echo " • Database: localhost:${POSTGRES_PORT:-5432}"
echo ""
"$(dirname "${BASH_SOURCE[0]}")/urls.sh"

# Reopen directly in DevContainer window if interactive and editor is available
if [ "$NO_OPEN" != "true" ] && [ -z "$CI" ] && [ -t 1 ]; then
Expand Down
22 changes: 22 additions & 0 deletions templates/base/urls.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Prints the addresses of all running services. Usage: ./urls.sh
cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1

if [ -f .env ]; then
export $(grep -E '^(FRONTEND_PORT|BACKEND_PORT|POSTGRES_PORT)=' .env 2>/dev/null | xargs) || true
fi

FRONTEND_URL="http://localhost:${FRONTEND_PORT:-3000}"
BACKEND_URL="http://localhost:${BACKEND_PORT:-8000}"

echo ""
echo "✅ Fullstack services are up and running:"
echo " • Frontend: $FRONTEND_URL"
echo " • Backend: $BACKEND_URL"
# Only FastAPI serves interactive API docs; probe so we don't print dead links
if command -v curl >/dev/null 2>&1 && curl -fs -o /dev/null "$BACKEND_URL/docs"; then
echo " • API docs: $BACKEND_URL/docs"
fi
echo " • Database: localhost:${POSTGRES_PORT:-5432}"
echo " • Pipelock: http://localhost:8888 (egress proxy, no UI — logs: docker compose logs -f pipelock)"
echo ""
Loading