snake-reactor / Dockerfile
underrate's picture
Upload Dockerfile
b764497 verified
# Build stage
FROM node:18-alpine AS builder
WORKDIR /app
# Install dependencies with legacy peer deps flag
COPY package*.json ./
RUN npm install
COPY . .
# Build using node_modules/.bin/vite directly
RUN node node_modules/vite/bin/vite.js build
# Production stage with nginx
FROM nginx:alpine
# Copy built files to nginx html directory
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 7860
CMD ["nginx", "-g", "daemon off;"]