]>
Commit | Line | Data |
---|---|---|
1 | ## Using Docker | |
2 | ||
3 | The fastest and recommended way to get your Homer instance up and running is | |
4 | with Docker. The Docker image comes with a web server built-in so that all you | |
5 | need to worry about is your config file. | |
6 | ||
7 | ### docker | |
8 | ||
9 | To launch container: | |
10 | ||
11 | ```sh | |
12 | docker run -d \ | |
13 | -p 8080:8080 \ | |
14 | -v </your/local/assets/>:/www/assets \ | |
15 | --restart=always \ | |
16 | b4bz/homer:latest | |
17 | ``` | |
18 | ||
19 | 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" [...]`). | |
20 | ||
21 | ### docker-compose | |
22 | ||
23 | The `docker-compose.yml` file must be edited to match your needs. | |
24 | Set the port and volume (equivalent to `-p` and `-v` arguments): | |
25 | ||
26 | ```yaml | |
27 | volumes: | |
28 | - /your/local/assets/:/www/assets | |
29 | ports: | |
30 | - 8080:8080 | |
31 | ``` | |
32 | ||
33 | To launch container: | |
34 | ||
35 | ```sh | |
36 | cd /path/to/docker-compose.yml | |
37 | docker-compose up -d | |
38 | ``` | |
39 | ||
40 | 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`: | |
41 | ||
42 | ```yaml | |
43 | environment: | |
44 | - UID=1000 | |
45 | - GID=1000 | |
46 | ``` | |
47 | ||
48 | ## Shipping your own web server | |
49 | ||
50 | ### Prebuilt release tarball | |
51 | ||
52 | 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. | |
53 | ||
54 | ```sh | |
55 | wget https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip | |
56 | unzip homer.zip | |
57 | cd homer | |
58 | cp assets/config.yml.dist assets/config.yml | |
59 | npx serve # or python -m http.server 8010 or apache, nginx ... | |
60 | ``` | |
61 | ||
62 | ### Building from source | |
63 | ||
64 | ```sh | |
65 | # Using yarn (recommended) | |
66 | yarn install | |
67 | yarn build | |
68 | ||
69 | # **OR** Using npm | |
70 | npm install | |
71 | npm run build | |
72 | ``` | |
73 | ||
74 | Then your dashboard is ready to use in the `/dist` directory. |