diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..91907a8 --- /dev/null +++ b/deploy.sh @@ -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 diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 2487efe..f8e0a4e 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -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"