33 lines
608 B
Docker
33 lines
608 B
Docker
# Frontend Dockerfile for hilingriviw
|
|
FROM node:18-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Install pnpm
|
|
RUN npm install -g pnpm
|
|
|
|
# Copy package files
|
|
COPY hilingriviw/package.json hilingriviw/pnpm-lock.yaml ./
|
|
|
|
# Install dependencies
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
# Copy source code
|
|
COPY hilingriviw/ ./
|
|
|
|
# Build the application
|
|
RUN pnpm build
|
|
|
|
# Production stage - serve with nginx
|
|
FROM nginx:alpine
|
|
|
|
# Copy built files
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
|
|
# Copy nginx configuration
|
|
COPY deployments/nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|