2024-10-17 18:53:49 +08:00
|
|
|
FROM node:18-alpine as build
|
|
|
|
|
|
|
|
WORKDIR /usr/local/app
|
|
|
|
COPY ./ /usr/local/app/
|
2024-11-12 18:08:09 +08:00
|
|
|
RUN npm install --save-dev
|
2024-10-17 19:01:21 +08:00
|
|
|
RUN npm run build
|
2024-10-17 18:53:49 +08:00
|
|
|
|
2024-12-10 22:31:29 +08:00
|
|
|
FROM nginx:alpine-slim
|
2024-10-17 18:53:49 +08:00
|
|
|
RUN rm -rf /usr/share/nginx/html/*
|
2024-10-17 19:19:43 +08:00
|
|
|
COPY --from=build /usr/local/app/build/ /usr/share/nginx/html
|
2024-10-17 18:53:49 +08:00
|
|
|
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
|
2024-12-10 22:36:29 +08:00
|
|
|
RUN rc-service nginx restart
|
2024-10-17 18:53:49 +08:00
|
|
|
|
|
|
|
EXPOSE 80
|