aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2020-06-23 22:56:33 -0700
committerBastien Wirtz <bastien.wirtz@gmail.com>2020-06-23 23:04:27 -0700
commita7ba289efa228613b18abc853c22fb3b5d99b9a7 (patch)
tree9ea0a10266d7bf00f235d95c6cae7b70cd31428d
parent796a16c8da1e40aef418559ade2252a5275708c8 (diff)
downloadhomer-a7ba289efa228613b18abc853c22fb3b5d99b9a7.tar.gz
homer-a7ba289efa228613b18abc853c22fb3b5d99b9a7.tar.zst
homer-a7ba289efa228613b18abc853c22fb3b5d99b9a7.zip
Regroup all editable files in one place
-rw-r--r--Dockerfile3
-rw-r--r--Dockerfile.arm32v73
-rw-r--r--Dockerfile.arm64v83
-rw-r--r--README.md16
-rw-r--r--docs/configuration.md2
-rw-r--r--docs/tips-and-tricks.md2
-rw-r--r--entrypoint.sh8
-rw-r--r--public/assets/config.yml.dist (renamed from public/config.yml.dist)0
-rw-r--r--public/assets/config.yml.dist.sample-sui (renamed from public/config.yml.dist.sample-sui)0
-rw-r--r--src/App.vue2
10 files changed, 19 insertions, 20 deletions
diff --git a/Dockerfile b/Dockerfile
index cd3ab11..c760fec 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -23,8 +23,9 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} &
23 23
24COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ 24COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
25COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh 25COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
26RUN mv /www/assets /www/default-assets
26 27
27USER ${USER} 28USER ${USER}
28EXPOSE ${PORT} 29EXPOSE ${PORT}
29VOLUME [ "/www/config.yml", "/www/assets" ] 30VOLUME [ "/www/assets" ]
30ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] 31ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7
index ef01d1f..8dc3b1c 100644
--- a/Dockerfile.arm32v7
+++ b/Dockerfile.arm32v7
@@ -33,8 +33,9 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} &
33 33
34COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ 34COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
35COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh 35COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
36RUN mv /www/assets /www/default-assets
36 37
37USER ${USER} 38USER ${USER}
38EXPOSE ${PORT} 39EXPOSE ${PORT}
39VOLUME [ "/www/config.yml", "/www/assets" ] 40VOLUME [ "/www/assets" ]
40ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] 41ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8
index 7899027..8a7e99f 100644
--- a/Dockerfile.arm64v8
+++ b/Dockerfile.arm64v8
@@ -33,8 +33,9 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} &
33 33
34COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ 34COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
35COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh 35COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
36RUN mv /www/assets /www/default-assets
36 37
37USER ${USER} 38USER ${USER}
38EXPOSE ${PORT} 39EXPOSE ${PORT}
39VOLUME [ "/www/config.yml", "/www/assets" ] 40VOLUME [ "/www/assets" ]
40ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] 41ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
diff --git a/README.md b/README.md
index 65ef9ab..f65b417 100644
--- a/README.md
+++ b/README.md
@@ -38,31 +38,23 @@ ervices on hand, from a simple `yaml` configuration file.
38 38
39Homer 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**. 39Homer 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**.
40 40
41For more information about the `config.yml` file see [configuration](docs/configuration.md) the section. 41See [documentation](docs/configuration.md) for information about the configuration (`assets/config.yml`) options.
42 42
43### Using docker 43### Using docker
44 44
45```sh 45```sh
46docker run -p 8080:8080 -v /your/local/config.yml:/www/config.yml -v /your/local/assets/:/www/assets b4bz/homer:latest 46docker run -p 8080:8080 -v /your/local/assets/:/www/assets b4bz/homer:latest
47``` 47```
48 48
49As a bind mount is used here, docker will not copy the initial content of the `assets` directory to the mounted directory.
50You can initialise your assets directory with the content provided in this repository
51```sh
52cp -r /public/assets/* /your/local/assets/
53```
54
55**Alternatively** if you just want to provide images/icons without customizing the other files (app manifest & pwa icons), you can mount a custom directory in the `www` directory and use it in your `config.yml` for icons path.
56
57### Using the release tarball (prebuilt, ready to use) 49### Using the release tarball (prebuilt, ready to use)
58 50
59Download and extract the latest the latest release (`homer.zip`) from the [release page](https://github.com/bastienwirtz/homer/releases), rename the `config.yml.dist` file to `config.yml`, and put it behind a webserver. 51Download 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.
60 52
61```sh 53```sh
62wget https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip 54wget https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip
63unzip homer.zip 55unzip homer.zip
64cd homer 56cd homer
65cp config.yml.dist config.yml 57cp assets/config.yml.dist assets/config.yml
66npx serve # or python -m http.server 8010 or apache, nginx ... 58npx serve # or python -m http.server 8010 or apache, nginx ...
67``` 59```
68 60
diff --git a/docs/configuration.md b/docs/configuration.md
index a2469ed..409db34 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -1,6 +1,6 @@
1## Configuration 1## Configuration
2 2
3Title, icons, links, colors, and services can be configured in the `config.yml` file (located in project root directory once built, or in the `public/` directory in developement mode), using [yaml](http://yaml.org/) format. 3Title, icons, links, colors, and services can be configured in the `config.yml` file (located in `/assets` directory once built, or in the `public/assets` directory in developement mode), using [yaml](http://yaml.org/) format.
4 4
5```yaml 5```yaml
6--- 6---
diff --git a/docs/tips-and-tricks.md b/docs/tips-and-tricks.md
index 632b62d..fda670d 100644
--- a/docs/tips-and-tricks.md
+++ b/docs/tips-and-tricks.md
@@ -74,7 +74,7 @@ Great if you have a lot of services or a lot of tags!
74 74
75Homer doesn't yet provide a way to edit your configuration from inside Homer itself, but that doesnt mean it cant be done! 75Homer doesn't yet provide a way to edit your configuration from inside Homer itself, but that doesnt mean it cant be done!
76 76
77You can setup and use [Code-Server](https://github.com/cdr/code-server) to edit your config.yml file from anywhere! 77You can setup and use [Code-Server](https://github.com/cdr/code-server) to edit your `config.yml` file from anywhere!
78 78
79If you're running Homer in docker, you can setup a Code-Server container and pass your homer config directory into it. 79If you're running Homer in docker, you can setup a Code-Server container and pass your homer config directory into it.
80Simply pass your homer config directory as and extra -v parameter to your code-server container: 80Simply pass your homer config directory as and extra -v parameter to your code-server container:
diff --git a/entrypoint.sh b/entrypoint.sh
index 7623322..0b7cd24 100644
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -1,6 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3yes n | cp -i /www/config.yml.dist /www/config.yml 3while true; do echo n; done | cp -Ri /www/default-assets/* /www/assets/
4while true; do echo n; done | cp -Ri /app/dist/www/assets /www/assets 2>/dev/null 4
5# Ensure compatibility with previous version (config.yml was in the root directory)
6if [ -f "/www/config.yml" ]; then
7 yes n | cp -i /www/config.yml /www/assets
8fi
5 9
6darkhttpd /www/ --no-listing --port $PORT 10darkhttpd /www/ --no-listing --port $PORT
diff --git a/public/config.yml.dist b/public/assets/config.yml.dist
index 6be66e1..6be66e1 100644
--- a/public/config.yml.dist
+++ b/public/assets/config.yml.dist
diff --git a/public/config.yml.dist.sample-sui b/public/assets/config.yml.dist.sample-sui
index 71eaef0..71eaef0 100644
--- a/public/config.yml.dist.sample-sui
+++ b/public/assets/config.yml.dist.sample-sui
diff --git a/src/App.vue b/src/App.vue
index 17c3214..613c743 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -156,7 +156,7 @@ export default {
156 document.title = `${this.config.title} | ${this.config.subtitle}`; 156 document.title = `${this.config.title} | ${this.config.subtitle}`;
157 }, 157 },
158 methods: { 158 methods: {
159 getConfig: function (path = "config.yml") { 159 getConfig: function (path = "assets/config.yml") {
160 return fetch(path).then((response) => { 160 return fetch(path).then((response) => {
161 if (!response.ok) { 161 if (!response.ok) {
162 throw Error(response.statusText); 162 throw Error(response.statusText);