Files
dd-multitool/web/Dockerfile
koneko 7a87b284af
Some checks failed
Deploy bot / build-and-deploy (push) Failing after 2s
Readd
2025-08-26 00:28:59 +02:00

33 lines
631 B
Docker

# Stage 1: Build the Vite app
FROM node:20-alpine AS builder
# Set working directory
WORKDIR /app
# Copy package.json and package-lock.json (or pnpm-lock.yaml / yarn.lock)
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the app
COPY . .
# Build the app
RUN npm run build
# Stage 2: Serve the app with a lightweight server
FROM nginx:alpine
# Copy built assets from builder
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy custom nginx config if needed (optional)
# COPY nginx.conf /etc/nginx/nginx.conf
# Expose port 80
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]