Skip to content

Commit

Permalink
Dockerfile improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
pbu88 committed Sep 2, 2021
1 parent 6106cfe commit 950f276
Show file tree
Hide file tree
Showing 4 changed files with 643 additions and 132 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ RUN npm install -g typescript@4.3.5
RUN npm install -g @angular/cli@12.2.2

# Frontend
COPY ./frontend/package.json /diffy/frontend/
COPY ./frontend/ /diffy/frontend/
WORKDIR /diffy/frontend
RUN npm install --legacy-peer-deps
RUN npm run-script build

# Backend
COPY ./backend/package.json /diffy/backend/
COPY ./backend/ /diffy/backend/
WORKDIR /diffy/backend
RUN npm install
RUN npm run-script build

# By default expose port 3000 and run `node /diffy/src/app.js` when executing the image
EXPOSE 3000
Expand Down
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "sh run-tests.sh",
"build": "rm -r dist;tsc",
"v2_test": "jest dist/tests/v2/**/*.js dist/tests/v2/*.js",
"start": "npm run build && node dist/src/App.js"
"start": "node dist/src/App.js"
},
"author": "",
"license": "ISC",
Expand Down
Loading

0 comments on commit 950f276

Please sign in to comment.