Files
VLoop/frontend/Dockerfile

26 lines
518 B
Docker
Raw Normal View History

2025-12-30 01:21:09 +08:00
#
# Multi-stage build for Vue (Vite) frontend, served by Nginx.
#
# Build:
# docker build -f frontend/Dockerfile -t feedsystem-frontend .
#
ARG NGINX_CONFIG=nginx.conf
2025-12-30 01:21:09 +08:00
FROM node:24-alpine AS build
WORKDIR /src
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci
COPY frontend/ ./
RUN npm run build
FROM nginx:1.27-alpine
ARG NGINX_CONFIG
COPY frontend/${NGINX_CONFIG} /etc/nginx/conf.d/default.conf
2025-12-30 01:21:09 +08:00
COPY --from=build /src/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]