[gemini] feat: add proxy server to fix CORS issue (#512) (#513)
Some checks failed
Deploy Nexus / deploy (push) Failing after 6s

This commit was merged in pull request #513.
This commit is contained in:
2026-03-25 15:36:47 +00:00
parent 83b53d0659
commit 5bd43302d9
7 changed files with 951 additions and 20 deletions

View File

@@ -1,6 +1,35 @@
# Stage 1: Build the Node.js server
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
# Stage 2: Create the final Nginx image
FROM nginx:alpine
# Copy the Node.js server from the builder stage
COPY --from=builder /app /app
# Copy the static files
COPY . /usr/share/nginx/html
RUN rm -f /usr/share/nginx/html/Dockerfile \
/usr/share/nginx/html/docker-compose.yml \
/usr/share/nginx/html/deploy.sh
/usr/share/nginx/html/deploy.sh \
/usr/share/nginx/html/server.js \
/usr/share/nginx/html/package.json \
/usr/share/nginx/html/package-lock.json \
/usr/share/nginx/html/node_modules
# Copy the Nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf
# Expose port 80 for Nginx and 3001 for the Node.js server
EXPOSE 80
EXPOSE 3001
# Start both Nginx and the Node.js server
CMD ["sh", "-c", "node /app/server.js & nginx -g 'daemon off;'"]