Files
The-transit-Project/scripts/deploy.sh
T
Sven laptop 1154d1d658
Build and Push Docker Images / detect-changes (push) Successful in 15s
Build and Push Docker Images / build-auth-api (push) Successful in 1m2s
Build and Push Docker Images / build-employee-api (push) Successful in 1m2s
Build and Push Docker Images / build-transit-api (push) Successful in 1m2s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m10s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m22s
Build and Push Docker Images / deploy-test-node (push) Successful in 4s
chore: standardize service domains and error logging
2026-09-18 19:26:05 +02:00

71 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
# Quick deployment helper script
# Usage: ./scripts/deploy.sh [start|stop|restart|logs|status]
set -e
COMMAND=${1:-status}
case $COMMAND in
start)
echo "🚀 Starting XTransit services..."
docker-compose up -d
echo "✅ Services started!"
echo ""
echo "📋 Service URLs:"
echo " Admin UI: http://localhost:5174"
echo " Auth API: https://auth.xtransit.testinstance.nl"
echo " Transit API: https://transit.xtransit.testinstance.nl"
echo " Employee API: http://localhost:4000"
;;
stop)
echo "⏹️ Stopping XTransit services..."
docker-compose down
echo "✅ Services stopped!"
;;
restart)
echo "🔄 Restarting XTransit services..."
docker-compose restart
echo "✅ Services restarted!"
;;
logs)
SERVICE=${2:-admin_ui}
echo "📋 Logs for $SERVICE (last 100 lines):"
docker-compose logs --tail=100 -f $SERVICE
;;
status)
echo "📊 XTransit Services Status:"
docker-compose ps
;;
build)
echo "🔨 Building all services..."
docker-compose build
echo "✅ Build complete!"
;;
clean)
echo "🧹 Cleaning up containers and volumes..."
docker-compose down -v
echo "✅ Cleanup complete!"
;;
*)
echo "Usage: $0 [start|stop|restart|logs|status|build|clean]"
echo ""
echo "Commands:"
echo " start - Start all services"
echo " stop - Stop all services"
echo " restart - Restart all services"
echo " logs [svc] - View logs (optional service name)"
echo " status - Show service status"
echo " build - Build all Docker images locally"
echo " clean - Remove containers and volumes"
exit 1
;;
esac