diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..2b6f6588 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.env +saves +mods + diff --git a/.travis.yml b/.travis.yml index 4cea0045..a96ff5ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,11 @@ before_install: # see https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" script: - - docker build -t "zopanix/factorio:${TRAVIS_TAG}" . + - | + if [ -z "$TRAVIS_TAG" ]; then + TRAVIS_TAG="latest" + fi + docker build -t "zopanix/factorio:${TRAVIS_TAG}" . deploy: provider: script script: docker tag "zopanix/factorio:${TRAVIS_TAG}" "zopanix/factorio:latest" && docker push "zopanix/factorio:${TRAVIS_TAG}" && docker push "zopanix/factorio:latest" diff --git a/Dockerfile b/Dockerfile index 8f857686..f2350491 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,8 +19,8 @@ ENV FACTORIO_AUTOSAVE_INTERVAL=2 \ FACTORIO_ALLOW_COMMANDS=false \ FACTORIO_NO_AUTO_PAUSE=false \ FACTORIO_LATENCY_MS=100 \ - VERSION=0.13.16 \ - FACTORIO_SHA1=52de126ce47bf24b795db07ff83ed13f8f537c0c \ + VERSION=0.14.8 \ + FACTORIO_SHA1=db71bd07aeb8b3775c9254597eaf5af858c84b7d \ FACTORIO_WAITING=false \ FACTORIO_MODE=normal \ FACTORIO_SERVER_NAME= \ diff --git a/README.md b/README.md index 45d01636..ecc0e9f6 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ -Factorio +Factorio [![Build Status](https://travis-ci.org/zopanix/docker_factorio_server.svg?branch=master)](https://travis-ci.org/zopanix/docker_factorio_server) [![Docker Pulls](https://img.shields.io/docker/pulls/zopanix/factorio.svg?maxAge=2592000)](https://hub.docker.com/r/zopanix/factorio/) ===== Factorio Server in docker -[![Build Status](https://travis-ci.org/zopanix/docker_factorio_server.svg?branch=master)](https://travis-ci.org/zopanix/docker_factorio_server) - -Current Version +Versions ----- -0.13.13 +Please checkout the different [tags](https://hub.docker.com/r/zopanix/factorio/tags/) + ### What's new ? #### Factorio See [factorio's site](http://www.factorio.com) @@ -14,9 +13,6 @@ See [factorio's site](http://www.factorio.com) * New semver for version !!!Tags have changed now!!! * Automated build with travis -Versions ------ -I'm keeping the image up to date. If you need to use an older version, checkout out the different [tags](https://hub.docker.com/r/zopanix/factorio/tags/). How to use ? ----- @@ -217,6 +213,36 @@ Error Util.cpp:57: Unknown error ``` Check supplied Username and Password for mistakes. +### Docker Compose +You may use docker-compose to easily setup your game server using the following command: + +`docker-compose up -d` + +that will run the container as a service in the background automatically. +You may change the file content according to your preferences. + +Also if you want to setup your game server via docker-compose without having to build the image every time or even to download this repo, just copy the docker-compose.yml file and comment the line: + +`build: .` + +and uncomment the line: + +`#image: zopanix/factorio:TAG` + +changing the tag to whatever you want to install. + +This way docker will automatically pull the image from the Docker Hub with the version you specified without the need for any build. + +The saves directory and the mods directory must be specified either in the environment before running `docker-compose up -d`: + +` +export FACTORIO_SAVES_DIR=./save +export FACTORIO_MODS_DIR=./mods +docker-compose up -d +` + +Or, just copy the env.sample to .env and modify as appropriate. + #### Waiting for ready This is a beta feature which has nothing to do with factorio... leave it as it is for the moment. I'm working with some collegues on something new which should work very well and please a lot of people. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..8bd07b28 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,17 @@ +version: '2' +services: + game: + build: . + #image: zopanix/factorio:TAG + volumes: + - ./saves:/opt/factorio/saves + - ./mods:/opt/factorio/mods + ports: + - "34197:34197/udp" + environment: + - ${FACTORIO_SAVES_DIR}:/opt/factorio/saves:Z + - ${FACTORIO_MODS_DIR}:/opt/factorio/mods:Z + ports: + - "34197:34197/udp" + restart: always + diff --git a/env.sample b/env.sample new file mode 100644 index 00000000..aaa674f2 --- /dev/null +++ b/env.sample @@ -0,0 +1,3 @@ +FACTORIO_SAVES_DIR=./save +FACTORIO_MODS_DIR=./mods +