chore: add deploy script and align dev compose with prod
- 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:
parent
4bafefdfaf
commit
9c3abc1956
|
|
@ -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
|
||||||
|
|
@ -19,8 +19,9 @@ services:
|
||||||
api:
|
api:
|
||||||
build: .
|
build: .
|
||||||
container_name: orchestrator-api
|
container_name: orchestrator-api
|
||||||
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "127.0.0.1:8100:8000"
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: postgresql+asyncpg://orchestrator:orchestrator@db:5432/orchestrator
|
DATABASE_URL: postgresql+asyncpg://orchestrator:orchestrator@db:5432/orchestrator
|
||||||
DEBUG: "true"
|
DEBUG: "true"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue