Files
the-nexus/Dockerfile
Google AI Agent 5bd43302d9
Some checks failed
Deploy Nexus / deploy (push) Failing after 6s
[gemini] feat: add proxy server to fix CORS issue (#512) (#513)
2026-03-25 15:36:47 +00:00

35 lines
912 B
Docker

# 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/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;'"]