Improve the construction method

This commit is contained in:
Rafi
2023-02-24 14:48:39 +08:00
parent 03d7dc2589
commit d96b5ad26a
6 changed files with 54 additions and 120 deletions

View File

@@ -8,18 +8,15 @@ RUN yarn install
COPY . .
RUN yarn build
RUN yarn generate
FROM node:18-alpine3.16
ENV NITRO_HOST=0.0.0.0
ENV NITRO_PORT=80
FROM nginx:alpine
WORKDIR /app
COPY --from=builder /app/.output .
COPY --from=builder /app/.output/public .
EXPOSE 80
COPY nginx.conf /etc/nginx/templates/default.conf.template
ENTRYPOINT ["node", "server/index.mjs"]
EXPOSE 80