From 2474da335e1bc0ce25ac3e48a873c9c48cae2455 Mon Sep 17 00:00:00 2001 From: David Andersen Date: Sat, 30 Dec 2017 20:33:05 -0800 Subject: [PATCH] minor text changes --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index af0847a..172a429 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,11 @@ NOTE: This is only the server. The game is available at [factorio.com](https://w Run the server to create the necessary folder structure and configuration files. For this example data is stored in `/opt/factorio`. ``` -chown 845:845 /tmp/factorio # 0.16+ only -docker run -d -p 34197:34197/udp -p 27015:27015/tcp \ +sudo mkdir -p /opt/factorio +sudo chown 845:845 /opt/factorio +sudo docker run -d \ + -p 34197:34197/udp \ + -p 27015:27015/tcp \ -v /opt/factorio:/factorio \ --name factorio \ --restart=always \ @@ -48,7 +51,7 @@ For those new to Docker, here is an explanation of the options: * `--restart` - Restart the server if it crashes and at system start * `--name` - Name the container "factorio" (otherwise it has a funny random name). -The `chown` command is needed because in 0.16+, we no longer run the game server as root for security reasons, but rather as a 'factorio' user with user id 845. The host must therefore allow these files to be written by that user. +The `chown` command is needed because in 0.16+, we no longer run the game server as root for security reasons, but rather as a 'factorio' user with user id 845. The host must therefore allow these files to be written by that user. Check the logs to see what happened: @@ -153,6 +156,16 @@ To keep things simple, the container uses a single volume mounted at `/factorio` `-- _autosave1.zip +## Docker Compose + +``` +git clone https://github.com/dtandersen/docker_factorio_server.git +sudo mkdir -p /opt/factorio +sudo chown 845:845 /opt/factorio +cd docker_factorio_server/0.16 +sudo docker-compose up -d +``` + ## Ports * `34197/udp` - Game server (required). @@ -162,6 +175,7 @@ To keep things simple, the container uses a single volume mounted at `/factorio` ## Environment Variables * `PORT` (0.15+) - Start the server on an alterate port, .e.g. `docker run -e "PORT=34198"`. +* `RCON_PORT` (0.16+) - Start the RCON on an alterate port, .e.g. `docker run -e "RCON_PORT=34198"`. ## Troubleshooting