From 62164aab03e3269369c1ec1b143b1d3a60b0f8f8 Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 9 Jan 2024 11:13:29 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20add=20docker-compose.yml=20?= =?UTF-8?q?and=20update=20README=20(#74)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Benjamin Koerber Co-authored-by: Rob van der Leek <5324924+robvanderleek@users.noreply.github.com> --- README.md | 25 +++++++++++++++++++++++++ docker-compose.yml | 10 ++++++++++ 2 files changed, 35 insertions(+) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index cd434ee..fa09ea7 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,31 @@ directory outside the container, for example: docker run -v /home//.local/share/mudslide:/usr/src/app/cache mudslide login ``` +## Docker Compose + +If you chose to use `docker-compose` instead of `docker` you can build the +Docker image using the supplied `docker-compose.yml` file (which in turn +depends on the supplied `Dockerfile`): + +```shell +docker-compose build +``` + +Test if the build was successful: + +```shell +docker-compose run mudslide +``` + +Since Mudslide keeps authentication state on disk you need to mount a state +directory outside the container, for example in `~/.local/share/mudslide`: + +See respective lines in `docker-compose.yml` +```yaml + volumes: + - ~/.local/share/mudslide:/usr/src/app/cache +``` + # Usage Available commands and options can be listed with `--help` flag: diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..718a6cd --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2.2' + +services: + + mudslide: + build: ./ + network_mode: host + volumes: + - ~/.local/share/mudslide:/usr/src/app/cache + container_name: mudslide