From e4537f134b02966e98b30520563395e17a1afe78 Mon Sep 17 00:00:00 2001 From: simonporte <32496803+simonporte@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:39:47 +0200 Subject: Added docker-compose.yml Plus short explanation in readme Changed the commit as pointed by @Shuro Explained readme more as asked by @bastienwirtz --- README.md | 29 +++++++++++++++++++++++++++++ docker-compose.yml | 14 ++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index 170b9d7..c35d57f 100644 --- a/README.md +++ b/README.md @@ -70,12 +70,41 @@ See [documentation](docs/configuration.md) for information about the configurati ### Using docker +To launch container : + ```sh docker run -p 8080:8080 -v /your/local/assets/:/www/assets b4bz/homer:latest ``` Default assets will be automatically installed in the `/www/assets` directory. Use `UID` and/or `GID` env var to change the assets owner (`docker run -e "UID=1000" -e "GID=1000" [...]`). +### Using docker-compose + +The `docker-compose.yml` file must be edited to match your needs. +Set the port and volume (equivalent to -p and -v arguments) : + +```yaml +volumes: + - /your/local/assets/:/www/assets +ports: + - 8080:8080 +``` + +To launch container : + +```sh +cd /path/to/docker-compose.yml +docker-compose up -d +``` + +Default assets will be automatically installed in the `/www/assets` directory. Use `UID` and/or `GID` env var to change the assets owner, also in `docker-compose.yml` : + +```yaml +environment: +- UID=1000 +- GID=1000 +``` + ### Using the release tarball (prebuilt, ready to use) Download and extract the latest the latest release (`homer.zip`) from the [release page](https://github.com/bastienwirtz/homer/releases), rename the `assets/config.yml.dist` file to `assets/config.yml`, and put it behind a webserver. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..85e9156 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +--- +version: "2" +services: + homer: + image: b4bz/homer + container_name: homer + volumes: + - /your/local/assets/:/www/assets + ports: + - 8080:8080 + #environment: + # - UID=1000 + # - GID=1000 + restart: unless-stopped -- cgit v1.2.3