Added docker for running master server

This commit is contained in:
Danielv123 committed 2017-03-31 22:34:39 +02:00
1 parent f5516891e3
commit ff9fac842e
2 files changed
+25 -2

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
FROM node:latest
RUN apt-get update && apt install git -y && git clone https://github.com/Danielv123/factorioClusterio.git && cd factorioClusterio && npm install && curl -o factorio.tar.gz -L https://www.factorio.com/get-download/latest/headless/linux64 && tar -xvzf factorio.tar.gz
LABEL maintainer "danielv@live.no"
EXPOSE 8080 34167
VOLUME factorioClusterio/instances
WORKDIR factorioClusterio
CMD node $MODE\.js start $INSTANCE
+14 -2
View File
@@ -48,6 +48,18 @@ To launch an instance with pm2
use `nano config.json` to change settings. use `nano config.json` to change settings.
**Ubuntu with Docker**
Clusterio has limited support for using docker.
sudo docker build -t clusterio --no-cache --force-rm factorioClusterio
sudo docker run --name master -e MODE=master -p 1234:8080 -d -it --restart=unless-stopped danielvestol/clusterio
sudo docker run --name slave -e MODE=client -e INSTANCE=world1 -v /srv/clusterio/instances:/factorioClusterio/instances -p 1235:34167 -it --restart=unless-stopped danielvestol/clusterio
The -v flag is used to specify the instance directory. Your instances (save files etc) will be stored there.
#Windows setup #Windows setup
Clusterio is built up of multiple parts. Here is a quick guide: Clusterio is built up of multiple parts. Here is a quick guide:
@@ -86,7 +98,7 @@ reboot when you are done, then proceed to the next steps. *reboots matter*
3. Type `node client.js start [instancename]` to create a new instance. 3. Type `node client.js start [instancename]` to create a new instance.
To connect to a master server running on a remote machine, open config.json with your favourite text editor (notepad++). You can also set it up to use the official server browser server. To connect to a master server running on a remote machine, open config.json with your favourite text editor (notepad++). You can also set it up to use the official server browser.
Change masterIP to something like 31.152.123.14 (provided by master server owner) Change masterIP to something like 31.152.123.14 (provided by master server owner)
@@ -96,7 +108,7 @@ Repeat step 3 for more servers on one machine. You should be able to find its po
**GameClient** **GameClient**
Alternative experimental client that may be broken: [clusterioClient](https://github.com/Danielv123/factorioClusterioClient) Fancy game client that does the following steps automatically: [clusterioClient](https://github.com/Danielv123/factorioClusterioClient)
1. Download the same version of the mod as the slave is running from [the mod portal](https://mods.factorio.com/mods/Danielv123/clusterio) or [github](https://github.com/Danielv123/factorioClusterioMod 1. Download the same version of the mod as the slave is running from [the mod portal](https://mods.factorio.com/mods/Danielv123/clusterio) or [github](https://github.com/Danielv123/factorioClusterioMod