]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - docs/getting_started.md
Filled in ssome docker content
[github/bastienwirtz/homer.git] / docs / getting_started.md
CommitLineData
b82626bc 1## Using Docker
82858235 2
b82626bc
ES
3The fastest and recommended way to get your Homer instance up and running is
4with Docker. The Docker image comes with a web server built-in so that all you
5need to worry about is your config file.
82858235 6
5e9a1986
ES
7Internally, the Docker image looks for the assets in the `/www/assets` directory
8so you can bind a volume from your host machine to that directory in order to
9modify and persist the configuration files. The web server serves the dashboard
10on port 8080, but using a port binding will let you expose that to whatever
11external port you like.
12
b82626bc 13### docker
82858235
ES
14
15To launch container:
16
17```sh
18docker run -d \
19 -p 8080:8080 \
5e9a1986 20 -v </your/local/assets>:/www/assets \
82858235
ES
21 --restart=always \
22 b4bz/homer:latest
23```
24
5e9a1986
ES
25Use `UID` and/or `GID` env var to change the assets owner:
26
27```sh
28docker run -d \
29 -p 8080:8080 \
30 -v </your/local/assets>:/www/assets \
31 -e "UID=1000" -e "GID=1000" \
32 --restart=always \
33 b4bz/homer:latest
34```
82858235 35
b82626bc 36### docker-compose
82858235 37
5e9a1986
ES
38It is recommended to use docker-compose to manage your Docker containers, and
39below you can find a simple compose yaml file. Copy the contents into a
40`docker-compose.yaml` and modify the volume binding to your desired directory to
41get started:
82858235
ES
42
43```yaml
5e9a1986
ES
44version: '3.3'
45services:
46 homer:
47 restart: always
48 volumes:
49 - /your/local/assets:/www/assets
50 ports:
51 - 8080:8080
52 image: b4bz/homer
82858235
ES
53```
54
55To launch container:
56
57```sh
58cd /path/to/docker-compose.yml
59docker-compose up -d
60```
61
5e9a1986 62Use `UID` and/or `GID` env var to change the assets owner:
82858235
ES
63
64```yaml
5e9a1986
ES
65version: '3.3'
66services:
67 homer:
68 restart: always
69 volumes:
70 - /your/local/assets:/www/assets
71 ports:
72 - 8080:8080
73 environment:
74 - UID=1000
75 - GID=1000
76 image: b4bz/homer
82858235
ES
77```
78
b82626bc
ES
79## Shipping your own web server
80
81### Prebuilt release tarball
82858235
ES
82
83Download and extract 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 web server.
84
85```sh
86wget https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip
87unzip homer.zip
88cd homer
89cp assets/config.yml.dist assets/config.yml
90npx serve # or python -m http.server 8010 or apache, nginx ...
91```
92
b82626bc 93### Building from source
82858235
ES
94
95```sh
96# Using yarn (recommended)
97yarn install
98yarn build
99
100# **OR** Using npm
101npm install
102npm run build
103```
104
105Then your dashboard is ready to use in the `/dist` directory.