From feb0feda76e331038e1b954ffe86bf16e7048117 Mon Sep 17 00:00:00 2001 From: Dumitru Uzun Date: Thu, 26 Aug 2021 12:53:57 +0300 Subject: [PATCH] Dockerfile: Avoid keeping npm in RAM By running node directly, we save some RAM. In my case npm consumes 300MB and does nothing, just waits for the node process to exit. On small VPSes 300MB is a lot! --- dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 873585b24..ae1821752 100644 --- a/dockerfile +++ b/dockerfile @@ -22,7 +22,7 @@ RUN npm install && npm run build && npm prune EXPOSE 3001 VOLUME ["/app/data"] HEALTHCHECK --interval=60s --timeout=30s --start-period=300s CMD node extra/healthcheck.js -CMD ["npm", "run", "start-server"] +CMD ["node", "server/server.js"] FROM release AS nightly RUN npm run mark-as-nightly