Skip to content
Merged

Dev #96

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@ ENV NODE_ENV production

WORKDIR /home/node/app
COPY --chown=node:node . .
RUN npm install -g typescript

WORKDIR /home/node/app/backend
RUN npm install
RUN npm link typescript

WORKDIR /home/node/app/frontend
RUN npm install
RUN npm link typescript

WORKDIR /home/node/app

RUN npm install pm2 -g
# RUN npm install pm2 -g

EXPOSE 5050
EXPOSE 5051
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ FROM node:14-alpine

WORKDIR /home/node/app
COPY --chown=node:node . .
RUN npm install -g typescript

WORKDIR /home/node/app/backend
RUN npm install
RUN npm link typescript

WORKDIR /home/node/app/frontend
RUN npm install
RUN npm link typescript

WORKDIR /home/node/app

EXPOSE 5050
Expand Down
8 changes: 4 additions & 4 deletions dockerRunnerProd.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh

cd frontend
npm install | tee ./logs/frontend_installer.log
( npm run start | tee ./logs/frontend_runner.log ) & SERVER_PID=$!
npm install
( npm run start ) & SERVER_PID=$!

cd ../backend
npm install | tee ./logs/backend_installer.log
( npm run start | tee ./logs/backend_runner.log ) & BACKEND_SERVER_PID=$!
npm install
( npm run start ) & BACKEND_SERVER_PID=$!