Fix frontend URLs for production deployment and resolve database issues
- Update API base URL from localhost to https://api.hive.home.deepblack.cloud - Update WebSocket URL to https://hive.home.deepblack.cloud for proper TLS routing - Remove metadata field from Project model to fix SQLAlchemy conflict - Remove index from JSON expertise column in AgentRole to fix PostgreSQL indexing - Update push script to use local registry instead of Docker Hub - Add Gitea repository support and monitoring endpoints 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -4,24 +4,54 @@
|
||||
|
||||
set -e
|
||||
|
||||
REGISTRY="anthonyrawlins"
|
||||
LOCAL_REGISTRY="registry.home.deepblack.cloud"
|
||||
REGISTRY_PORT="5000"
|
||||
NAMESPACE="tony"
|
||||
BACKEND_IMAGE="hive-backend"
|
||||
FRONTEND_IMAGE="hive-frontend"
|
||||
LOCAL_BACKEND="hive-hive-backend"
|
||||
LOCAL_FRONTEND="hive-hive-frontend"
|
||||
|
||||
echo "🏗️ Building and pushing Hive images to Docker Hub..."
|
||||
echo "🏗️ Building and pushing Hive images to local registry..."
|
||||
|
||||
# Change to hive directory
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Build images with docker compose
|
||||
echo "🔨 Building images with docker compose..."
|
||||
docker compose -f docker-compose.swarm.yml build
|
||||
|
||||
# Get the actual image names from docker compose
|
||||
BACKEND_COMPOSE_IMAGE=$(docker compose -f docker-compose.swarm.yml config | grep "image.*hive-backend" | cut -d: -f2- | xargs)
|
||||
FRONTEND_COMPOSE_IMAGE=$(docker compose -f docker-compose.swarm.yml config | grep "image.*hive-frontend" | cut -d: -f2- | xargs)
|
||||
|
||||
echo "📦 Found backend image: $BACKEND_COMPOSE_IMAGE"
|
||||
echo "📦 Found frontend image: $FRONTEND_COMPOSE_IMAGE"
|
||||
|
||||
# Tag and push backend
|
||||
echo "📦 Pushing backend image..."
|
||||
docker tag ${LOCAL_BACKEND}:latest ${REGISTRY}/${BACKEND_IMAGE}:latest
|
||||
docker push ${REGISTRY}/${BACKEND_IMAGE}:latest
|
||||
echo "📦 Tagging and pushing backend image..."
|
||||
if [[ "$BACKEND_COMPOSE_IMAGE" != "${LOCAL_REGISTRY}/${NAMESPACE}/${BACKEND_IMAGE}:latest" ]]; then
|
||||
# If the compose image is locally built, tag it for registry
|
||||
LOCAL_BACKEND_IMAGE=$(docker images --format "table {{.Repository}}:{{.Tag}}" | grep hive.*backend | head -1)
|
||||
if [[ -n "$LOCAL_BACKEND_IMAGE" ]]; then
|
||||
docker tag "$LOCAL_BACKEND_IMAGE" "${LOCAL_REGISTRY}/${NAMESPACE}/${BACKEND_IMAGE}:latest"
|
||||
fi
|
||||
fi
|
||||
docker push "${LOCAL_REGISTRY}/${NAMESPACE}/${BACKEND_IMAGE}:latest"
|
||||
|
||||
# Tag and push frontend
|
||||
echo "📦 Pushing frontend image..."
|
||||
docker tag ${LOCAL_FRONTEND}:latest ${REGISTRY}/${FRONTEND_IMAGE}:latest
|
||||
docker push ${REGISTRY}/${FRONTEND_IMAGE}:latest
|
||||
echo "📦 Tagging and pushing frontend image..."
|
||||
if [[ "$FRONTEND_COMPOSE_IMAGE" != "${LOCAL_REGISTRY}/${NAMESPACE}/${FRONTEND_IMAGE}:latest" ]]; then
|
||||
# If the compose image is locally built, tag it for registry
|
||||
LOCAL_FRONTEND_IMAGE=$(docker images --format "table {{.Repository}}:{{.Tag}}" | grep hive.*frontend | head -1)
|
||||
if [[ -n "$LOCAL_FRONTEND_IMAGE" ]]; then
|
||||
docker tag "$LOCAL_FRONTEND_IMAGE" "${LOCAL_REGISTRY}/${NAMESPACE}/${FRONTEND_IMAGE}:latest"
|
||||
fi
|
||||
fi
|
||||
docker push "${LOCAL_REGISTRY}/${NAMESPACE}/${FRONTEND_IMAGE}:latest"
|
||||
|
||||
echo "✅ Images pushed to Docker Hub successfully!"
|
||||
echo "Backend: ${REGISTRY}/${BACKEND_IMAGE}:latest"
|
||||
echo "Frontend: ${REGISTRY}/${FRONTEND_IMAGE}:latest"
|
||||
echo "✅ Images pushed to local registry successfully!"
|
||||
echo "Backend: ${LOCAL_REGISTRY}/${NAMESPACE}/${BACKEND_IMAGE}:latest"
|
||||
echo "Frontend: ${LOCAL_REGISTRY}/${NAMESPACE}/${FRONTEND_IMAGE}:latest"
|
||||
echo ""
|
||||
echo "🔍 Verify images in registry:"
|
||||
echo "curl -X GET http://localhost:${REGISTRY_PORT}/v2/${NAMESPACE}/${BACKEND_IMAGE}/tags/list"
|
||||
echo "curl -X GET http://localhost:${REGISTRY_PORT}/v2/${NAMESPACE}/${FRONTEND_IMAGE}/tags/list"
|
||||
Reference in New Issue
Block a user