diff --git a/.woodpecker.yml b/.woodpecker.yml index 57b0f0f..2835e5e 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -129,14 +129,14 @@ steps: commands: - *kaniko_setup - | - DESTINATIONS="--destination git.mosaicstack.dev/mosaic/api:${CI_COMMIT_SHA:0:8}" + DESTINATIONS="--destination git.mosaicstack.dev/mosaic/stack-api:${CI_COMMIT_SHA:0:8}" if [ "$CI_COMMIT_BRANCH" = "main" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/api:latest" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-api:latest" elif [ "$CI_COMMIT_BRANCH" = "develop" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/api:dev" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-api:dev" fi if [ -n "$CI_COMMIT_TAG" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/api:$CI_COMMIT_TAG" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-api:$CI_COMMIT_TAG" fi /kaniko/executor --context . --dockerfile apps/api/Dockerfile $DESTINATIONS when: @@ -159,14 +159,14 @@ steps: commands: - *kaniko_setup - | - DESTINATIONS="--destination git.mosaicstack.dev/mosaic/web:${CI_COMMIT_SHA:0:8}" + DESTINATIONS="--destination git.mosaicstack.dev/mosaic/stack-web:${CI_COMMIT_SHA:0:8}" if [ "$CI_COMMIT_BRANCH" = "main" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/web:latest" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-web:latest" elif [ "$CI_COMMIT_BRANCH" = "develop" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/web:dev" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-web:dev" fi if [ -n "$CI_COMMIT_TAG" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/web:$CI_COMMIT_TAG" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-web:$CI_COMMIT_TAG" fi /kaniko/executor --context . --dockerfile apps/web/Dockerfile --build-arg NEXT_PUBLIC_API_URL=https://api.mosaicstack.dev $DESTINATIONS when: @@ -189,14 +189,14 @@ steps: commands: - *kaniko_setup - | - DESTINATIONS="--destination git.mosaicstack.dev/mosaic/postgres:${CI_COMMIT_SHA:0:8}" + DESTINATIONS="--destination git.mosaicstack.dev/mosaic/stack-postgres:${CI_COMMIT_SHA:0:8}" if [ "$CI_COMMIT_BRANCH" = "main" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/postgres:latest" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-postgres:latest" elif [ "$CI_COMMIT_BRANCH" = "develop" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/postgres:dev" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-postgres:dev" fi if [ -n "$CI_COMMIT_TAG" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/postgres:$CI_COMMIT_TAG" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-postgres:$CI_COMMIT_TAG" fi /kaniko/executor --context docker/postgres --dockerfile docker/postgres/Dockerfile $DESTINATIONS when: @@ -219,14 +219,14 @@ steps: commands: - *kaniko_setup - | - DESTINATIONS="--destination git.mosaicstack.dev/mosaic/openbao:${CI_COMMIT_SHA:0:8}" + DESTINATIONS="--destination git.mosaicstack.dev/mosaic/stack-openbao:${CI_COMMIT_SHA:0:8}" if [ "$CI_COMMIT_BRANCH" = "main" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/openbao:latest" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-openbao:latest" elif [ "$CI_COMMIT_BRANCH" = "develop" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/openbao:dev" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-openbao:dev" fi if [ -n "$CI_COMMIT_TAG" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/openbao:$CI_COMMIT_TAG" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-openbao:$CI_COMMIT_TAG" fi /kaniko/executor --context docker/openbao --dockerfile docker/openbao/Dockerfile $DESTINATIONS when: @@ -249,14 +249,14 @@ steps: commands: - *kaniko_setup - | - DESTINATIONS="--destination git.mosaicstack.dev/mosaic/orchestrator:${CI_COMMIT_SHA:0:8}" + DESTINATIONS="--destination git.mosaicstack.dev/mosaic/stack-orchestrator:${CI_COMMIT_SHA:0:8}" if [ "$CI_COMMIT_BRANCH" = "main" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/orchestrator:latest" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-orchestrator:latest" elif [ "$CI_COMMIT_BRANCH" = "develop" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/orchestrator:dev" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-orchestrator:dev" fi if [ -n "$CI_COMMIT_TAG" ]; then - DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/orchestrator:$CI_COMMIT_TAG" + DESTINATIONS="$DESTINATIONS --destination git.mosaicstack.dev/mosaic/stack-orchestrator:$CI_COMMIT_TAG" fi /kaniko/executor --context . --dockerfile apps/orchestrator/Dockerfile $DESTINATIONS when: @@ -278,7 +278,7 @@ steps: commands: - apk add --no-cache curl - | - for package in api web postgres openbao orchestrator; do + for package in stack-api stack-web stack-postgres stack-openbao stack-orchestrator; do STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST \ -H "Authorization: token $GITEA_TOKEN" \ "https://git.mosaicstack.dev/api/v1/packages/mosaic/container/${package}/-/link/stack") diff --git a/build-images.sh b/build-images.sh index ba56e85..bd68d45 100755 --- a/build-images.sh +++ b/build-images.sh @@ -9,19 +9,19 @@ echo "" # Build postgres with pgvector echo "📦 Building postgres..." -docker build -t mosaic-stack-postgres:latest -f docker/postgres/Dockerfile docker/postgres/ +docker build -t stack-postgres:latest -f docker/postgres/Dockerfile docker/postgres/ # Build openbao echo "📦 Building openbao..." -docker build -t mosaic-stack-openbao:latest -f docker/openbao/Dockerfile docker/openbao/ +docker build -t stack-openbao:latest -f docker/openbao/Dockerfile docker/openbao/ # Build API echo "📦 Building API..." -docker build -t mosaic-stack-api:latest -f apps/api/Dockerfile . --build-arg NODE_ENV=production +docker build -t stack-api:latest -f apps/api/Dockerfile . --build-arg NODE_ENV=production # Build orchestrator echo "📦 Building orchestrator..." -docker build -t mosaic-stack-orchestrator:latest -f apps/orchestrator/Dockerfile . +docker build -t stack-orchestrator:latest -f apps/orchestrator/Dockerfile . # Build web (using NEXT_PUBLIC_API_URL from .env if available) echo "📦 Building web..." @@ -30,13 +30,13 @@ if [ -f .env ]; then else NEXT_PUBLIC_API_URL="https://api.mosaicstack.dev" fi -docker build -t mosaic-stack-web:latest -f apps/web/Dockerfile . --build-arg NEXT_PUBLIC_API_URL="$NEXT_PUBLIC_API_URL" +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 mosaic-stack +docker images | grep "^stack-" echo "" echo "Next step:" diff --git a/deploy-swarm.sh b/deploy-swarm.sh index 5eb3554..0b82582 100755 --- a/deploy-swarm.sh +++ b/deploy-swarm.sh @@ -84,7 +84,7 @@ if [ "$IMAGE_TAG" = "local" ]; then USE_REGISTRY=false echo "🔍 Using local images (IMAGE_TAG=local)" IMAGES_MISSING=0 - for img in mosaic-stack-postgres mosaic-stack-openbao mosaic-stack-api mosaic-stack-orchestrator mosaic-stack-web; do + for img in stack-postgres stack-openbao stack-api stack-orchestrator stack-web; do if ! docker images --format "{{.Repository}}" | grep -q "^${img}$"; then echo " ⚠️ Missing: $img" IMAGES_MISSING=1 @@ -112,11 +112,11 @@ else echo " Tag: $IMAGE_TAG" echo "" echo " Images will be pulled from:" - echo " - $REGISTRY/mosaic/postgres:$IMAGE_TAG" - echo " - $REGISTRY/mosaic/openbao:$IMAGE_TAG" - echo " - $REGISTRY/mosaic/api:$IMAGE_TAG" - echo " - $REGISTRY/mosaic/orchestrator:$IMAGE_TAG" - echo " - $REGISTRY/mosaic/web:$IMAGE_TAG" + echo " - $REGISTRY/mosaic/stack-postgres:$IMAGE_TAG" + echo " - $REGISTRY/mosaic/stack-openbao:$IMAGE_TAG" + echo " - $REGISTRY/mosaic/stack-api:$IMAGE_TAG" + echo " - $REGISTRY/mosaic/stack-orchestrator:$IMAGE_TAG" + echo " - $REGISTRY/mosaic/stack-web:$IMAGE_TAG" echo "" echo " Note: Ensure you're logged in to the registry:" echo " docker login $REGISTRY" diff --git a/docker-compose.swarm.yml b/docker-compose.swarm.yml index 56e9e87..1294ca6 100644 --- a/docker-compose.swarm.yml +++ b/docker-compose.swarm.yml @@ -3,7 +3,7 @@ services: # PostgreSQL Database # ====================== postgres: - image: git.mosaicstack.dev/mosaic/postgres:${IMAGE_TAG:-latest} + image: git.mosaicstack.dev/mosaic/stack-postgres:${IMAGE_TAG:-latest} env_file: .env environment: POSTGRES_USER: ${POSTGRES_USER:-mosaic} @@ -56,7 +56,7 @@ services: # OpenBao Secrets Vault # ====================== openbao: - image: git.mosaicstack.dev/mosaic/openbao:${IMAGE_TAG:-latest} + image: git.mosaicstack.dev/mosaic/stack-openbao:${IMAGE_TAG:-latest} env_file: .env environment: OPENBAO_ADDR: ${OPENBAO_ADDR:-http://0.0.0.0:8200} @@ -225,7 +225,7 @@ services: # Mosaic API # ====================== api: - image: git.mosaicstack.dev/mosaic/api:${IMAGE_TAG:-latest} + image: git.mosaicstack.dev/mosaic/stack-api:${IMAGE_TAG:-latest} env_file: .env environment: NODE_ENV: production @@ -268,7 +268,7 @@ services: # Mosaic Orchestrator # ====================== orchestrator: - image: git.mosaicstack.dev/mosaic/orchestrator:${IMAGE_TAG:-latest} + image: git.mosaicstack.dev/mosaic/stack-orchestrator:${IMAGE_TAG:-latest} env_file: .env user: "1000:1000" environment: @@ -309,7 +309,7 @@ services: # Mosaic Web # ====================== web: - image: git.mosaicstack.dev/mosaic/web:${IMAGE_TAG:-latest} + image: git.mosaicstack.dev/mosaic/stack-web:${IMAGE_TAG:-latest} env_file: .env environment: NODE_ENV: production