Skip to content

Commit

Permalink
fix: docker startup
Browse files Browse the repository at this point in the history
  • Loading branch information
acifani committed May 8, 2024
1 parent 4924695 commit 4c17d40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ ENV PATH="$PNPM_HOME:$PATH"
WORKDIR /usr/src/app
COPY . /usr/src/app

RUN corepack enable && pnpm install
RUN corepack enable && pnpm install && pnpm build && pnpm prune --prod

CMD ["pnpm", "start"]
CMD ["pnpm", "start:docker"]
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"build": "tsc",
"prestart": "pnpm build",
"start": "node --env-file=.env ./dist/index.js"
"start": "node --env-file=.env ./dist/index.js",
"start:docker": "node ./dist/index.js"
},
"keywords": [],
"author": "Alessandro Cifani <alessandro.cifani@gmail.com>",
Expand Down

0 comments on commit 4c17d40

Please sign in to comment.