feat(docker): provide a more efficient compilation inside docker

This commit is contained in:
davinkevin 2022-03-26 17:00:09 +01:00
parent 519214b0a4
commit 27d832c7b1
No known key found for this signature in database
GPG key ID: B323BEBBC8EE667E
2 changed files with 4 additions and 2 deletions

View file

@ -11,7 +11,8 @@ COPY package*.json ./
RUN npm install RUN npm install
COPY . . COPY . .
RUN ./node_modules/.bin/tsc
EXPOSE 4000 EXPOSE 4000
CMD ["npm", "start"] CMD ["npm", "run", "start:prod"]

View file

@ -17,7 +17,8 @@
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"start": "tsc && node public/js/server.js", "start": "tsc && node public/js/server.js",
"start:dev": "tsc && node public/js/server.js & tsc-watch" "start:dev": "tsc && node public/js/server.js & tsc-watch",
"start:prod": "node public/js/server.js"
}, },
"keywords": [ "keywords": [
"wordle", "wordle",