Skip to content

Commit

Permalink
Fixed docker app start
Browse files Browse the repository at this point in the history
  • Loading branch information
xdan committed Aug 24, 2023
1 parent b4e57c5 commit 8a441e4
Show file tree
Hide file tree
Showing 7 changed files with 2,689 additions and 118 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
FROM node:16.15.0-alpine

WORKDIR /opt/server

COPY . .
RUN npm i

CMD ["sh", "-c", "make start"]
RUN npm ci
RUN ./node_modules/.bin/tsc -b tsconfig.json

CMD ["pm2-runtime", "--instances", "max", "dist/index.js"]

RUN npm install --global pm2@latest
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ services:
context: ./
tty: true
working_dir: /opt/server
volumes:
- ./app:/opt/server
- ./dist:/opt/static
env_file:
- .env
ports:
Expand Down
Loading

0 comments on commit 8a441e4

Please sign in to comment.