Skip to content

Commit

Permalink
feat: update docker with node 20 support #20
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Apr 22, 2024
1 parent 4f7c80e commit 2c934e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
24 changes: 6 additions & 18 deletions Dockerfile
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" ]
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
build:
context: .
args:
NODE_VERSION: 18-alpine3.19
NODE_VERSION: iron-alpine3.19
environment:
- API=${API}
ports:
Expand Down

0 comments on commit 2c934e0

Please sign in to comment.