fix: Build Docker image locally instead of pulling from registry

- 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 <noreply@anthropic.com>
This commit is contained in:
2025-07-12 19:53:07 -06:00
parent 8bd721074e
commit e48fdc9691
2 changed files with 8 additions and 9 deletions

View File

@@ -2,7 +2,10 @@ version: '3.8'
services: services:
bct-app: bct-app:
image: bct-whitelabel:latest build:
context: .
dockerfile: Dockerfile
target: production
container_name: bct-astro-prod container_name: bct-astro-prod
ports: ports:
- "3000:3000" - "3000:3000"

View File

@@ -82,15 +82,12 @@ stop_containers() {
# Function to start containers # Function to start containers
start_containers() { start_containers() {
echo -e "${BLUE}🔄 Starting containers...${NC}" echo -e "${BLUE}🔄 Building and starting containers...${NC}"
# Set the image version # Build and start services
export DOCKER_IMAGE_TAG="$VERSION" docker-compose -f "$COMPOSE_FILE" up -d --build
# Start services echo -e "${GREEN}✅ Containers built and started!${NC}"
docker-compose -f "$COMPOSE_FILE" up -d
echo -e "${GREEN}✅ Containers started!${NC}"
} }
# Function to wait for health check # Function to wait for health check
@@ -153,7 +150,6 @@ main() {
check_env_vars check_env_vars
# Deployment steps # Deployment steps
pull_image
stop_containers stop_containers
start_containers start_containers