feat: add flexible docker-compose architecture with profiles
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- Add OpenBao services to docker-compose.yml with profiles (openbao, full) - Add docker-compose.build.yml for local builds vs registry pulls - Make PostgreSQL and Valkey optional via profiles (database, cache) - Create example compose files for common deployment scenarios: - docker/docker-compose.example.turnkey.yml (all bundled) - docker/docker-compose.example.external.yml (all external) - docker/docker.example.hybrid.yml (mixed deployment) - Update documentation: - Enhance .env.example with profiles and external service examples - Update README.md with deployment mode quick starts - Add deployment scenarios to docs/OPENBAO.md - Create docker/DOCKER-COMPOSE-GUIDE.md with comprehensive guide - Clean up repository structure: - Move shell scripts to scripts/ directory - Move documentation to docs/ directory - Move docker compose examples to docker/ directory - Configure for external Authentik with internal services: - Comment out Authentik services (using external OIDC) - Comment out unused volumes for disabled services - Keep postgres, valkey, openbao as internal services This provides a flexible deployment architecture supporting turnkey, production (all external), and hybrid configurations via Docker Compose profiles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
43
scripts/build-images.sh
Executable file
43
scripts/build-images.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Mosaic Stack - Build Images for Swarm Deployment
|
||||
# This script builds all Docker images needed for the stack
|
||||
|
||||
echo "🔨 Building Mosaic Stack images for swarm deployment..."
|
||||
echo ""
|
||||
|
||||
# Build postgres with pgvector
|
||||
echo "📦 Building postgres..."
|
||||
docker build -t stack-postgres:latest -f docker/postgres/Dockerfile docker/postgres/
|
||||
|
||||
# Build openbao
|
||||
echo "📦 Building openbao..."
|
||||
docker build -t stack-openbao:latest -f docker/openbao/Dockerfile docker/openbao/
|
||||
|
||||
# Build API
|
||||
echo "📦 Building API..."
|
||||
docker build -t stack-api:latest -f apps/api/Dockerfile . --build-arg NODE_ENV=production
|
||||
|
||||
# Build orchestrator
|
||||
echo "📦 Building orchestrator..."
|
||||
docker build -t stack-orchestrator:latest -f apps/orchestrator/Dockerfile .
|
||||
|
||||
# Build web (using NEXT_PUBLIC_API_URL from .env if available)
|
||||
echo "📦 Building web..."
|
||||
if [ -f .env ]; then
|
||||
NEXT_PUBLIC_API_URL=$(grep "^NEXT_PUBLIC_API_URL=" .env | cut -d= -f2 || echo "https://api.mosaicstack.dev")
|
||||
else
|
||||
NEXT_PUBLIC_API_URL="https://api.mosaicstack.dev"
|
||||
fi
|
||||
docker build -t stack-web:latest -f apps/web/Dockerfile . --build-arg NEXT_PUBLIC_API_URL="$NEXT_PUBLIC_API_URL"
|
||||
|
||||
echo ""
|
||||
echo "✅ All images built successfully!"
|
||||
echo ""
|
||||
echo "Built images:"
|
||||
docker images | grep "^stack-"
|
||||
|
||||
echo ""
|
||||
echo "Next step:"
|
||||
echo " Deploy to swarm: ./deploy-swarm.sh mosaic"
|
||||
Reference in New Issue
Block a user