2025-02-22 17:38:53 +02:00

27 lines
551 B
Docker

# Use a lightweight Node.js image
FROM node:16-alpine as build-stage
# Set the working directory
WORKDIR /app
# Copy package.json and install dependencies
COPY package*.json ./
RUN npm install
# Copy the rest of the application code
COPY . .
# Build the Vue.js app
RUN npm run build
# Use a lightweight Nginx image to serve the app
FROM nginx:alpine as production-stage
# Copy the built app from the build stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Start Nginx
CMD ["nginx", "-g", "daemon off;"]