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