mirror of
https://github.com/Dvorinka/Trackeep.git
synced 2026-07-29 05:53:50 +00:00
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
This commit is contained in:
@@ -17,9 +17,19 @@ if ! command -v docker compose &> /dev/null; then
|
||||
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 up --build -d
|
||||
docker compose $COMPOSE_FILE up --build -d
|
||||
|
||||
# Wait for services to be ready
|
||||
echo "⏳ Waiting for services to be ready..."
|
||||
@@ -27,11 +37,11 @@ sleep 10
|
||||
|
||||
# Check service status
|
||||
echo "🔍 Checking service status..."
|
||||
docker compose ps
|
||||
docker compose $COMPOSE_FILE ps
|
||||
|
||||
# Test API health
|
||||
echo "🏥 Testing API health..."
|
||||
if curl -s http://localhost:8080/health > /dev/null; then
|
||||
if curl -s http://localhost:${BACKEND_PORT:-8080}/health > /dev/null; then
|
||||
echo "✅ Backend API is healthy!"
|
||||
else
|
||||
echo "❌ Backend API is not responding"
|
||||
@@ -39,7 +49,7 @@ fi
|
||||
|
||||
# Test frontend
|
||||
echo "🌐 Testing frontend..."
|
||||
if curl -s -I http://localhost:5173 > /dev/null; then
|
||||
if curl -s -I http://localhost:${FRONTEND_PORT:-3000} > /dev/null; then
|
||||
echo "✅ Frontend is accessible!"
|
||||
else
|
||||
echo "❌ Frontend is not responding"
|
||||
@@ -47,12 +57,17 @@ fi
|
||||
|
||||
echo ""
|
||||
echo "🎉 Trackeep is now running!"
|
||||
echo "📱 Frontend: http://localhost:5173"
|
||||
echo "🔧 Backend API: http://localhost:8080"
|
||||
echo "📊 Health Check: http://localhost:8080/health"
|
||||
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: [email protected]"
|
||||
echo " Password: password"
|
||||
echo ""
|
||||
echo "🛑 To stop: docker compose down"
|
||||
echo "🛑 To stop: docker compose $COMPOSE_FILE down"
|
||||
|
||||
Reference in New Issue
Block a user