Files
bamort/docker/start-dev.sh
T
Bardioc26 261a6294cb Desktop app dynamic config of API Port (#40)
* added dynamic configuration of Port in Desktop app
* added dynamic configuration of API_URL to docker deployments.

Now it works with editing only .env file.
2026-02-27 11:55:30 +01:00

44 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
echo "🚀 Starting Bamort Development Environment..."
# Prüfe ob Docker läuft
if ! docker info > /dev/null 2>&1; then
echo "❌ Docker ist nicht gestartet. Bitte starte Docker zuerst."
exit 1
fi
# Gehe ins Docker-Verzeichnis
cd "$(dirname "$0")"
# Load development environment variables
if [ -f .env.dev ]; then
echo "📝 Loading configuration from .env.dev"
export $(grep -v '^#' .env.dev | xargs)
else
if [ -f .env ]; then
echo "📝 Loading configuration from .env"
export $(grep -v '^#' .env | xargs)
else
echo "⚠️ Warning: .env not found, using defaults"
fi
fi
# Get current git commit
export GIT_COMMIT=$(git rev-parse --short HEAD 2>/dev/null || echo "unknown")
echo "📝 Git Commit: $GIT_COMMIT"
echo "📦 Building and starting development containers..."
echo "🔧 Frontend will use API: ${API_URL:-http://localhost:8180}"
# Stoppe vorhandene Container
docker-compose -f docker-compose.dev.yml down
# Baue und starte die Container
docker-compose -f docker-compose.dev.yml --env-file .env.dev up --build -d
echo "✅ Development environment started."
echo "📱 Frontend: http://localhost:5173"
echo "🔌 Backend: http://localhost:8180"
echo "🗄️ phpMyAdmin: http://localhost:8081"