Storage size of docker image minimized

This commit is contained in:
Dennis Heinrich 2024-11-26 10:07:23 +01:00
parent 4689de586e
commit 50d463ac3b
2 changed files with 7 additions and 2 deletions

View file

@ -6,6 +6,10 @@ LABEL authors="Dennis Heinrich"
WORKDIR /app
COPY . /app
RUN npm install
RUN npm run build
CMD ["npm", "start"]
ENTRYPOINT ["npm", "start"]
## Simplyfy the rm commands
RUN rm -rf .ddev/ source/ misc/ .git .gitignore config.example.json Dockerfile docker-compose.yml README.md
CMD ["npm", "run", "start-only"]
ENTRYPOINT ["npm", "run", "start-only"]

View file

@ -5,6 +5,7 @@
"main": "source/Main.ts",
"scripts": {
"start": "npx tsc && node build/Main.js",
"start-only": "node build/Main.js",
"build": "npx tsc",
"schema": "npx json2ts -i source/Schema/ServerStats.json -o ./source/Schema/ServerStats.d.ts --unreachableDefinitions",
"test": "echo \"Error: no test specified\" && exit 1"