From 3abc65f8a833004577cceda2dd9d7e981e054bb4 Mon Sep 17 00:00:00 2001 From: Gentatsu Date: Sun, 21 Mar 2021 00:08:48 +0000 Subject: [PATCH 1/2] Added docker-compose file. Builds locally from Dockerfile. --- docker-compose.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..766332c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: "3.6" +services: + zoffline: + image: zoffline/zoffline:latest + build: + context: . + dockerfile: Dockerfile + container_name: zoffline + network_mode: host + environment: + - TZ=Europe/London + volumes: + - ./storage/:/usr/src/app/zwift-offline/storage + ports: + - 80:80 + - 443:443 + - 3022:3022/udp + - 3023:3023 + restart: unless-stopped From e5a20e9885813e00adf0b1e18bd91ebc9eab1c3a Mon Sep 17 00:00:00 2001 From: Gentatsu Date: Sun, 21 Mar 2021 00:14:34 +0000 Subject: [PATCH 2/2] Modified README to include docker-compose instructions. Update README.md --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 317289a..964188c 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,32 @@ zoffline can be installed on the same machine as Zwift or another local machine. +
Using docker-compose + +* Install docker-compose +* Either use the docker-compose.yml file in this repo which will build from the Dockerfile, or use this example compose file: + ``` + services: + zoffline: + image: zoffline/zoffline:latest + container_name: zoffline + network_mode: host + environment: + - TZ=Europe/London + volumes: + - ./storage/:/usr/src/app/zwift-offline/storage + ports: + - 80:80 + - 443:443 + - 3022:3022/udp + - 3023:3023 + restart: unless-stopped + ``` +* If you are not running zoffline on the same PC that Zwift is running: create a ``server-ip.txt`` file in the ``storage`` directory containing the IP address of the PC running zoffline. +* Start zoffline with: + ``docker-compose up -d `` +
+ ### Step 2: Configure Zwift client to use zoffline
Windows Instructions