|
@@ -2,7 +2,7 @@ FROM node:18 AS build-stage
|
|
|
ENV TZ Asia/Shanghai
|
|
|
MAINTAINER wangliang@qmth.com.cn
|
|
|
|
|
|
-WORKDIR /app
|
|
|
+WORKDIR /opt
|
|
|
COPY . .
|
|
|
RUN npm config set registry http://registry.cnpmjs.org && npm config set registry http://registry.npm.taobao.org
|
|
|
RUN npm install
|
|
@@ -13,9 +13,8 @@ ENV TZ Asia/Shanghai
|
|
|
MAINTAINER wangliang@qmth.com.cn
|
|
|
|
|
|
WORKDIR /opt
|
|
|
-ARG CONF_NAME
|
|
|
RUN rm /etc/nginx/conf.d/default.conf
|
|
|
-COPY --from=build-stage /app/dist /opt/dist
|
|
|
-COPY ./$CONF_NAME /etc/nginx/conf.d/$CONF_NAME
|
|
|
+COPY --from=build-stage /opt/dist /opt/dist
|
|
|
+COPY ./app.conf /etc/nginx/conf.d/app.conf
|
|
|
|
|
|
CMD ["nginx","-g","daemon off;"]
|