From 89a5b5d19acab07419b0b3254f4a8e408cc5582f Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 25 Nov 2025 09:31:47 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b4696b6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM node:20-alpine AS build + +WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm install +COPY . . +RUN npm run build:h5 + + +FROM nginx:stable-alpine AS production + +COPY --from=build /app/dist/build/h5 /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file