21 lines
457 B
Docker
21 lines
457 B
Docker
# Frontend Dockerfile for Vue/Vite TypeScript project
|
|
FROM node:24-alpine AS build
|
|
|
|
WORKDIR /app
|
|
|
|
COPY frontend/package.json frontend/yarn.lock frontend/.yarnrc.yml ./
|
|
COPY frontend/.yarn/ ./.yarn/
|
|
RUN corepack enable && yarn install --immutable
|
|
|
|
COPY frontend/ .
|
|
RUN yarn build
|
|
|
|
FROM nginx:alpine AS production
|
|
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
COPY frontend/nginx.conf /etc/nginx/nginx.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|