remove nginx

This commit is contained in:
sirin.ph 2025-11-20 17:57:52 +07:00
parent fa3e0284af
commit b4050c3684
2 changed files with 11 additions and 16 deletions

View File

@ -1,35 +1,30 @@
# Build stage
FROM node:20-alpine AS builder
# Set working directory
WORKDIR /app
# Copy package files
COPY package.json pnpm-lock.yaml ./
# Install pnpm
RUN npm install -g pnpm
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy source code
COPY . .
# Build the application
ARG GEMINI_API_KEY
ENV VITE_GEMINI_API_KEY=${GEMINI_API_KEY}
RUN pnpm run build
# Production stage
FROM nginx:alpine
FROM node:20-alpine
# Copy built assets from builder stage
COPY --from=builder /app/dist /usr/share/nginx/html
WORKDIR /app
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
RUN npm install -g serve
# Expose port 80
EXPOSE 80
COPY --from=builder /app/dist ./dist
# Start nginx
CMD ["nginx", "-g", "daemon off;"]
EXPOSE 3033
CMD ["serve", "-s", "dist", "-l", "3033"]

View File

@ -9,7 +9,7 @@ services:
- GEMINI_API_KEY=${GEMINI_API_KEY}
container_name: pradit-prod
ports:
- "3033:80"
- "3033:3033"
environment:
- NODE_ENV=production
restart: unless-stopped