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