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:
@@ -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"
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user