Fix Docker build context and file paths for gtm-app
This commit is contained in:
@@ -88,8 +88,8 @@ services:
|
|||||||
|
|
||||||
gtm-app:
|
gtm-app:
|
||||||
build:
|
build:
|
||||||
context: ./gtm-architect
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: gtm-architect/Dockerfile
|
||||||
container_name: gtm-app
|
container_name: gtm-app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
# Stage 1: Build the React frontend
|
# Stage 1: Build the React frontend
|
||||||
FROM node:18-slim AS builder
|
FROM node:18-slim AS builder
|
||||||
WORKDIR /app
|
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
|
RUN npm install --force
|
||||||
COPY . .
|
|
||||||
|
# Copy the rest of the frontend source code
|
||||||
|
COPY gtm-architect/ ./
|
||||||
|
|
||||||
|
# Build the frontend
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 2: Setup the production environment
|
# 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 built frontend from builder stage
|
||||||
COPY --from=builder /app/dist ./gtm-architect/dist
|
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/server.cjs ./gtm-architect/
|
||||||
COPY gtm-architect/package.json ./gtm-architect/
|
COPY gtm-architect/package.json ./gtm-architect/
|
||||||
COPY gtm_architect_orchestrator.py .
|
COPY gtm_architect_orchestrator.py .
|
||||||
COPY helpers.py .
|
COPY helpers.py .
|
||||||
COPY config.py .
|
COPY config.py .
|
||||||
|
# Use the specific requirements file for this app
|
||||||
COPY gtm-architect/requirements.txt .
|
COPY gtm-architect/requirements.txt .
|
||||||
COPY gtm_db_manager.py .
|
COPY gtm_db_manager.py .
|
||||||
|
|
||||||
|
|
||||||
# Install Python and Node.js dependencies
|
# Install Python and Node.js dependencies
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
RUN cd gtm-architect && npm install --production
|
RUN cd gtm-architect && npm install --production
|
||||||
|
|||||||
Reference in New Issue
Block a user