letsbe-orchestrator/deploy.sh

26 lines
653 B
Bash
Raw Permalink Normal View History

#!/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