Added docker-compose.yml

Plus short explanation in readme
Changed the commit as pointed by @Shuro
Explained readme more as asked by @bastienwirtz
This commit is contained in:
simonporte 2020-06-29 21:39:47 +02:00
parent a9aed9f9e2
commit e4537f134b
2 changed files with 43 additions and 0 deletions

View File

@ -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.

14
docker-compose.yml Normal file
View File

@ -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