diff --git a/Dockerfile.server b/Dockerfile.server index 010cfe2628..2c59e40897 100644 --- a/Dockerfile.server +++ b/Dockerfile.server @@ -58,18 +58,18 @@ COPY --chown=$user:$user packages/fork-htmlparser2 ./packages/fork-htmlparser2 RUN npm run bootstrap # We have a separate step for the server files because they are more likely to -# change. And we need all the server files because there is a postinstall -# script. +# change. -COPY --chown=$user:$user packages/server ./packages/server +COPY --chown=$user:$user packages/server/package*.json ./packages/server/ RUN npm run bootstrapServerOnly -# Now copy the source files. Put lib last as it's more likely to change. +# Now copy the source files. Put lib and server last as they are more likely to change. COPY --chown=$user:$user packages/fork-sax ./packages/fork-sax COPY --chown=$user:$user packages/renderer ./packages/renderer COPY --chown=$user:$user packages/tools ./packages/tools COPY --chown=$user:$user packages/lib ./packages/lib +COPY --chown=$user:$user packages/server ./packages/server # Finally build everything, in particular the TypeScript files. diff --git a/packages/server/package.json b/packages/server/package.json index 989e97b8f7..a792dbbfdb 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -3,11 +3,10 @@ "version": "2.5.4", "private": true, "scripts": { - "start-dev": "nodemon --config nodemon.json --ext ts,js,mustache,css,tsx dist/app.js --env dev", + "start-dev": "npm run build && nodemon --config nodemon.json --ext ts,js,mustache,css,tsx dist/app.js --env dev", "start-dev-no-watch": "node dist/app.js --env dev", "rebuild": "npm run clean && npm run build && npm run tsc", "build": "gulp build", - "postinstall": "npm run build", "devCreateDb": "node dist/app.js --env dev --create-db", "devDropTables": "node dist/app.js --env dev --drop-tables", "devDropDb": "node dist/app.js --env dev --drop-db",