Learncost frontend (#42)
* introduced central package registry by package init function * dynamic registration of routes, model, migrations and initializers. * setting a docker compose project name to prevent shutdown of other containers with the same (composer)name * ai documentation * app template * Create tests for ALL API entpoints in ALL packages Based on current data. Ensure that all API endpoints used in frontend are tested. These tests are crucial for the next refactoring tasks. * adopting agent instructions for a more consistent coding style * added desired module layout and debugging information * Fix All Failing tests All failing tests are fixed now that makes the refactoring more easy since all tests must pass * restored routes for maintenance * added common translations * added new tests for API Endpoint * Merge branch 'separate_business_logic' * added lern and skill improvement cost editing * Set Docker image tag when building to prevent rebuild when nothing has changed * add and remove PP for Weaponskill fixed * add and remove PP for same named skills fixed * add new task
This commit is contained in:
+16
-5
@@ -24,22 +24,33 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# Determine image tag from git commit hash (first 5 chars)
|
||||
GIT_TAG=$(git -C "$(dirname "$0")/.." rev-parse --short=5 HEAD 2>/dev/null || echo "latest")
|
||||
export GIT_TAG
|
||||
echo "🏷️ Image tag: ${GIT_TAG}"
|
||||
|
||||
echo "📦 Building and starting production containers..."
|
||||
echo "🔧 Frontend will use API: ${API_URL:-https://bamort-api.trokan.de}"
|
||||
|
||||
# Build before stopping existing containers
|
||||
docker-compose -f docker-compose.yml --env-file .env.prd build
|
||||
# Build only if images for this commit don't exist yet
|
||||
if ! docker image inspect "bamort-backend:${GIT_TAG}" > /dev/null 2>&1 || \
|
||||
! docker image inspect "bamort-frontend:${GIT_TAG}" > /dev/null 2>&1; then
|
||||
echo "🔨 Images not found for tag '${GIT_TAG}', building..."
|
||||
docker-compose -f docker-compose.yml --env-file .env.prd -p bamort build
|
||||
else
|
||||
echo "✅ Images already exist for tag '${GIT_TAG}', skipping build."
|
||||
fi
|
||||
|
||||
# Stoppe vorhandene Container
|
||||
docker-compose -f docker-compose.yml down
|
||||
docker-compose -f docker-compose.yml -p bamort down
|
||||
|
||||
# Baue und starte die Container
|
||||
docker-compose -f docker-compose.yml --env-file .env.prd up -d
|
||||
docker-compose -f docker-compose.yml --env-file .env.prd -p bamort up -d
|
||||
|
||||
echo "✅ Production environment started."
|
||||
echo "📱 Frontend: http://localhost:8181"
|
||||
echo "🔌 Backend: http://localhost:8182"
|
||||
echo ""
|
||||
echo "💡 To change API URL: Edit .env.prd and run:"
|
||||
echo " docker-compose -f docker-compose.yml restart frontend"
|
||||
echo " docker-compose -f docker-compose.yml -p bamort restart frontend"
|
||||
echo " (No rebuild needed!)"
|
||||
Reference in New Issue
Block a user