Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -713,3 +713,6 @@ CONTRIBUTION_GUIDE.md
.qodo
.windsurfrules
.windsurf/rules

# MCP servers
.serena
7 changes: 5 additions & 2 deletions docker/dockerfiles/frontend.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CMD ["npm", "start"]
### FOR PRODUCTION ###
# Builder stage for production build
FROM base AS builder
ENV REACT_APP_BACKEND_URL=""
ENV VITE_BACKEND_URL=""

# Copy package files and install dependencies
COPY ${BUILD_CONTEXT_PATH}/package.json ${BUILD_CONTEXT_PATH}/package-lock.json ./
Expand All @@ -32,7 +32,7 @@ RUN npm install --ignore-scripts
# Copy the rest of the application files
COPY ${BUILD_CONTEXT_PATH}/ .

# Build the React app
# Build with Vite
RUN npm run build

# Production stage
Expand All @@ -50,6 +50,9 @@ RUN mkdir -p /usr/share/nginx/html/config && \
chown nginx:nginx /usr/share/nginx/html/config && \
chmod 755 /usr/share/nginx/html/config

# Inject runtime config script into index.html
RUN sed -i 's|</head>| <script src="/config/runtime-config.js"></script>\n </head>|' /usr/share/nginx/html/index.html

# Copy the environment script
COPY ../frontend/generate-runtime-config.sh /docker-entrypoint.d/40-env.sh
RUN chmod +x /docker-entrypoint.d/40-env.sh
Expand Down
Loading