fix Dockerfile
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -1,19 +1,26 @@
|
|||||||
FROM node:18-alpine3.16 as builder
|
FROM node:18-alpine3.16 as builder
|
||||||
|
|
||||||
ENV NITRO_PORT=80
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json yarn.lock ./
|
COPY package.json yarn.lock ./
|
||||||
|
|
||||||
RUN yarn install
|
RUN yarn install && yarn cache clean
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
|
|
||||||
|
FROM node:18-alpine3.16
|
||||||
|
|
||||||
|
ENV NITRO_PORT=80
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=builder /app/.output/ .
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# TODO: You can use NITRO_PRESET=node_cluster in order to leverage multi-process performance using Node.js cluster module. https://nuxt.com/docs/getting-started/deployment
|
# TODO: You can use NITRO_PRESET=node_cluster in order to leverage multi-process performance using Node.js cluster module. https://nuxt.com/docs/getting-started/deployment
|
||||||
|
|
||||||
ENTRYPOINT ["node", ".output/server/index.mjs"]
|
ENTRYPOINT ["node", "server/index.mjs"]
|
||||||
Reference in New Issue
Block a user