From e48fdc9691e602063997fc18c33eb4e2abe42428 Mon Sep 17 00:00:00 2001 From: dzinesco Date: Sat, 12 Jul 2025 19:53:07 -0600 Subject: [PATCH] fix: Build Docker image locally instead of pulling from registry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change docker-compose.prod.yml from image: to build: configuration - Remove image pulling from deployment script - Add --build flag to docker-compose up command - Fixes "image not found" error by building from local Dockerfile This ensures the deployment script builds the image from source instead of trying to pull a non-existent image from a registry. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- docker-compose.prod.yml | 5 ++++- scripts/docker-deploy.sh | 12 ++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 1e1f327..4510e25 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -2,7 +2,10 @@ version: '3.8' services: bct-app: - image: bct-whitelabel:latest + build: + context: . + dockerfile: Dockerfile + target: production container_name: bct-astro-prod ports: - "3000:3000" diff --git a/scripts/docker-deploy.sh b/scripts/docker-deploy.sh index 5520450..9ec65fe 100755 --- a/scripts/docker-deploy.sh +++ b/scripts/docker-deploy.sh @@ -82,15 +82,12 @@ stop_containers() { # Function to start containers start_containers() { - echo -e "${BLUE}🔄 Starting containers...${NC}" + echo -e "${BLUE}🔄 Building and starting containers...${NC}" - # Set the image version - export DOCKER_IMAGE_TAG="$VERSION" + # Build and start services + docker-compose -f "$COMPOSE_FILE" up -d --build - # Start services - docker-compose -f "$COMPOSE_FILE" up -d - - echo -e "${GREEN}✅ Containers started!${NC}" + echo -e "${GREEN}✅ Containers built and started!${NC}" } # Function to wait for health check @@ -153,7 +150,6 @@ main() { check_env_vars # Deployment steps - pull_image stop_containers start_containers