From d5d25cc84c97bb92e47341a4e3269a72d3b9709c Mon Sep 17 00:00:00 2001 From: Floke Date: Fri, 2 Jan 2026 19:07:34 +0000 Subject: [PATCH] Fix Docker build context and file paths for gtm-app --- docker-compose.yml | 4 ++-- gtm-architect/Dockerfile | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index cb35018b..56b89a21 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -88,8 +88,8 @@ services: gtm-app: build: - context: ./gtm-architect - dockerfile: Dockerfile + context: . + dockerfile: gtm-architect/Dockerfile container_name: gtm-app restart: unless-stopped volumes: diff --git a/gtm-architect/Dockerfile b/gtm-architect/Dockerfile index 8b230a83..92921137 100644 --- a/gtm-architect/Dockerfile +++ b/gtm-architect/Dockerfile @@ -1,10 +1,17 @@ # Stage 1: Build the React frontend FROM node:18-slim AS builder WORKDIR /app -COPY package.json ./ -# Use --force to avoid issues with dependency versions + +# Copy package.json from the subdirectory (relative to project root) +COPY gtm-architect/package.json ./ + +# Install dependencies RUN npm install --force -COPY . . + +# Copy the rest of the frontend source code +COPY gtm-architect/ ./ + +# Build the frontend RUN npm run build # Stage 2: Setup the production environment @@ -19,16 +26,16 @@ RUN apt-get update && apt-get install -y curl && \ # Copy built frontend from builder stage COPY --from=builder /app/dist ./gtm-architect/dist -# Copy backend files and application code +# Copy backend files and application code (paths relative to project root) COPY gtm-architect/server.cjs ./gtm-architect/ COPY gtm-architect/package.json ./gtm-architect/ COPY gtm_architect_orchestrator.py . COPY helpers.py . COPY config.py . +# Use the specific requirements file for this app COPY gtm-architect/requirements.txt . COPY gtm_db_manager.py . - # Install Python and Node.js dependencies RUN pip install --no-cache-dir -r requirements.txt RUN cd gtm-architect && npm install --production @@ -37,4 +44,4 @@ RUN cd gtm-architect && npm install --production EXPOSE 3005 # Command to run the server -CMD ["node", "gtm-architect/server.cjs"] \ No newline at end of file +CMD ["node", "gtm-architect/server.cjs"]