-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update docker with node 20 support #20
- Loading branch information
Showing
2 changed files
with
7 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,12 @@ | ||
ARG NODE_VERSION | ||
FROM node:${NODE_VERSION} | ||
FROM node:${NODE_VERSION} as build-stage | ||
|
||
RUN apk --no-cache add git | ||
WORKDIR /app | ||
RUN corepack enable | ||
|
||
# Create app directory | ||
RUN mkdir -p /usr/src/app/.nuxt | ||
WORKDIR /usr/src/app | ||
|
||
# Install app dependencies | ||
COPY package.json yarn.lock /usr/src/app/ | ||
RUN yarn install | ||
RUN yarn add -D serve | ||
COPY . /usr/src/app | ||
COPY . . | ||
RUN yarn install | ||
RUN yarn generate | ||
|
||
# Set environment variables | ||
ENV NODE_ENV production | ||
ENV NUXT_HOST 0.0.0.0 | ||
ENV NUXT_PORT 3000 | ||
RUN yarn build | ||
|
||
EXPOSE 3000 | ||
CMD [ "yarn", "start" ] | ||
CMD [ "node", ".output/server/index.mjs" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters