Files
Trackeep/start.sh
T
Tomas Dvorak 954a1a1080 feat: migrate to DragonflyDB and clean up environment configuration
- Replace Redis with DragonflyDB for better performance and memory efficiency
- Remove redundant environment variables (POSTGRES_*, ENCRYPTION_KEY, OAUTH_SERVICE_URL)
- Consolidate database configuration to use single DB_* variables
- Use JWT_SECRET for both JWT tokens and encryption
- Remove PORT variable redundancy, use BACKEND_PORT consistently
- Clean up docker-compose configurations for dev/prod consistency
- Add DragonflyDB configuration with optimized memory usage
- Remove redis.conf as it's no longer needed
- Update health checks to use Redis-compatible CLI for DragonflyDB
- Add missing VITE_API_URL to production frontend
- Fix GitHub Actions to use correct go.sum path
- Clean up development directories and unused files
2026-03-05 23:51:34 +01:00

74 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
# Trackeep Startup Script
# This script starts the Trackeep application using Docker Compose
echo "🚀 Starting Trackeep..."
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
echo "❌ Docker is not running. Please start Docker first."
exit 1
fi
# Check if docker compose is available
if ! command -v docker compose &> /dev/null; then
echo "❌ docker compose is not available. Please install Docker Compose."
exit 1
fi
# Check if demo mode is enabled
DEMO_MODE=${VITE_DEMO_MODE:-false}
if [ "$DEMO_MODE" = "true" ]; then
echo "🎭 Demo mode enabled - starting without databases"
COMPOSE_FILE="-f docker-compose.demo.yml"
else
echo "🗄️ Normal mode enabled - starting with databases"
COMPOSE_FILE="-f docker-compose.yml"
fi
# Start the services
echo "📦 Building and starting containers..."
docker compose $COMPOSE_FILE up --build -d
# Wait for services to be ready
echo "⏳ Waiting for services to be ready..."
sleep 10
# Check service status
echo "🔍 Checking service status..."
docker compose $COMPOSE_FILE ps
# Test API health
echo "🏥 Testing API health..."
if curl -s http://localhost:${BACKEND_PORT:-8080}/health > /dev/null; then
echo "✅ Backend API is healthy!"
else
echo "❌ Backend API is not responding"
fi
# Test frontend
echo "🌐 Testing frontend..."
if curl -s -I http://localhost:${FRONTEND_PORT:-3000} > /dev/null; then
echo "✅ Frontend is accessible!"
else
echo "❌ Frontend is not responding"
fi
echo ""
echo "🎉 Trackeep is now running!"
echo "📱 Frontend: http://localhost:${FRONTEND_PORT:-3000}"
echo "🔧 Backend API: http://localhost:${BACKEND_PORT:-8080}"
echo "📊 Health Check: http://localhost:${BACKEND_PORT:-8080}/health"
if [ "$DEMO_MODE" = "true" ]; then
echo "🎭 Mode: Demo (no databases)"
else
echo "🗄️ Mode: Full (with databases)"
fi
echo ""
echo "👤 Demo Login Credentials:"
echo " Email: demo@trackeep.com"
echo " Password: password"
echo ""
echo "🛑 To stop: docker compose $COMPOSE_FILE down"