diff options
Diffstat (limited to 'docs/getting_started.md')
-rw-r--r-- | docs/getting_started.md | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/docs/getting_started.md b/docs/getting_started.md new file mode 100644 index 0000000..2a123e2 --- /dev/null +++ b/docs/getting_started.md | |||
@@ -0,0 +1,70 @@ | |||
1 | Homer is a full static html/js dashboard, generated from the source in `/src` using webpack. It's meant to be served by an HTTP server, **it will not work if you open dist/index.html directly over file:// protocol**. | ||
2 | |||
3 | See [documentation](docs/configuration.md) for information about the configuration (`assets/config.yml`) options. | ||
4 | |||
5 | ## Using docker | ||
6 | |||
7 | To launch container: | ||
8 | |||
9 | ```sh | ||
10 | docker run -d \ | ||
11 | -p 8080:8080 \ | ||
12 | -v </your/local/assets/>:/www/assets \ | ||
13 | --restart=always \ | ||
14 | b4bz/homer:latest | ||
15 | ``` | ||
16 | |||
17 | 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" [...]`). | ||
18 | |||
19 | ## Using docker-compose | ||
20 | |||
21 | The `docker-compose.yml` file must be edited to match your needs. | ||
22 | Set the port and volume (equivalent to `-p` and `-v` arguments): | ||
23 | |||
24 | ```yaml | ||
25 | volumes: | ||
26 | - /your/local/assets/:/www/assets | ||
27 | ports: | ||
28 | - 8080:8080 | ||
29 | ``` | ||
30 | |||
31 | To launch container: | ||
32 | |||
33 | ```sh | ||
34 | cd /path/to/docker-compose.yml | ||
35 | docker-compose up -d | ||
36 | ``` | ||
37 | |||
38 | 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`: | ||
39 | |||
40 | ```yaml | ||
41 | environment: | ||
42 | - UID=1000 | ||
43 | - GID=1000 | ||
44 | ``` | ||
45 | |||
46 | ## Using the release tarball (prebuilt, ready to use) | ||
47 | |||
48 | Download 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. | ||
49 | |||
50 | ```sh | ||
51 | wget https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip | ||
52 | unzip homer.zip | ||
53 | cd homer | ||
54 | cp assets/config.yml.dist assets/config.yml | ||
55 | npx serve # or python -m http.server 8010 or apache, nginx ... | ||
56 | ``` | ||
57 | |||
58 | ## Build manually | ||
59 | |||
60 | ```sh | ||
61 | # Using yarn (recommended) | ||
62 | yarn install | ||
63 | yarn build | ||
64 | |||
65 | # **OR** Using npm | ||
66 | npm install | ||
67 | npm run build | ||
68 | ``` | ||
69 | |||
70 | Then your dashboard is ready to use in the `/dist` directory. | ||