Skip to content

Commit

Permalink
refactor(docker): use bitnami
Browse files Browse the repository at this point in the history
  • Loading branch information
Iqro-dev authored and Mnigos committed Dec 27, 2024
1 parent ef97ea7 commit fbb9fd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
FROM node:20.12.2-debian as development
FROM bitnami/node:20.12.2 AS development

WORKDIR /usr/src/app

COPY package.json ./
COPY pnpm-lock.yaml ./

RUN npm install -g pnpm
RUN pnpm install

COPY . .

RUN pnpm run build

FROM node:20.12.2-debian as production
FROM bitnami/node:20.12.2 AS production

ARG NODE_ENV=production
ARG EnvironmentVariable
Expand All @@ -22,7 +23,8 @@ WORKDIR /usr/src/app
COPY package.json ./
COPY pnpm-lock.yaml ./

RUN pnpm install --production --ignore-scripts
RUN npm install -g pnpm
RUN pnpm install --production --ignore-scripts
RUN npm install pm2 -g

COPY . .
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"bun": "please-use-pnpm",
"pnpm": ">=9"
},
"packageManager": "pnpm@9.14.2",
"packageManager": "pnpm@9.0.1",
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
Expand Down

0 comments on commit fbb9fd1

Please sign in to comment.