chore: add deploy script and align dev compose with prod
Build and Push Docker Image / test (push) Successful in 44s Details
Build and Push Docker Image / build (push) Successful in 58s Details

- Add deploy.sh for automated registry login and deployment
- Update docker-compose-dev.yml to use same port binding as prod (127.0.0.1:8100)
- Add restart: unless-stopped to dev compose

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Matt 2025-12-08 21:20:36 +01:00
parent 4bafefdfaf
commit 9c3abc1956
2 changed files with 27 additions and 1 deletions

25
deploy.sh Normal file
View File

@ -0,0 +1,25 @@
#!/bin/bash
# Deploy script for LetsBe Orchestrator
# This handles registry authentication and deployment
set -e
REGISTRY="code.letsbe.solutions"
REGISTRY_USER="${REGISTRY_USER:-matt}"
REGISTRY_TOKEN="${REGISTRY_TOKEN:-db51180aa20509cddb2e7d3b34f3b321e382069c}"
echo "Logging into registry..."
echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" -u "${REGISTRY_USER}" --password-stdin
echo "Pulling latest images..."
docker compose pull
echo "Starting services..."
docker compose up -d
echo "Running migrations..."
sleep 5 # Wait for DB to be ready
docker compose exec -T api alembic upgrade head
echo "Deployment complete!"
docker compose ps

View File

@ -19,8 +19,9 @@ services:
api:
build: .
container_name: orchestrator-api
restart: unless-stopped
ports:
- "8000:8000"
- "127.0.0.1:8100:8000"
environment:
DATABASE_URL: postgresql+asyncpg://orchestrator:orchestrator@db:5432/orchestrator
DEBUG: "true"