#!/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