Use --only=production on npm install

Add --only=production flag to Dockerfile and the README entries
describing how to install nodes.  This will avoid pulling in a lot of
dependencies that are not needed for running master/slaves.
This commit is contained in:
Hornwitser committed 2019-08-07 10:18:14 +02:00
1 parent d0afcbf0ac
commit 200c8dbdeb
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ FROM node:9.11.2
RUN apt-get update && apt install git curl tar -y
RUN mkdir factorioClusterio
RUN git clone -b master https://github.com/Danielv123/factorioClusterio.git && cd factorioClusterio && npm install
RUN git clone -b master https://github.com/Danielv123/factorioClusterio.git && cd factorioClusterio && npm install --only=production
RUN cd factorioClusterio && curl -o factorio.tar.gz -L https://www.factorio.com/get-download/latest/headless/linux64 && tar -xf factorio.tar.gz
WORKDIR factorioClusterio
+2 -2
View File
@@ -95,7 +95,7 @@ Master and all slaves:
cd factorioClusterio
curl -o factorio.tar.gz -L https://www.factorio.com/get-download/latest/headless/linux64
tar -xf factorio.tar.gz
npm install
npm install --only=production
cp config.json.dist config.json
node ./lib/npmPostinstall.js
@@ -283,7 +283,7 @@ node client.js list
```
git pull
npm install
npm install --only=production
```
3. Download the latest version of the factorioClusterioMod from its github repo