diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2020-06-19 08:03:55 -0700 |
---|---|---|
committer | Bastien Wirtz <bastien.wirtz@gmail.com> | 2020-06-19 08:03:55 -0700 |
commit | 8d7ca88c469cb9591c57c620043c90542bfb0911 (patch) | |
tree | 92563dd43c6a0f134d5049aa3a2e63d45e9eae6c | |
parent | fea05ea099424bab0f3d9cede6f054a7c4970a3f (diff) | |
parent | b24251110179b86e12d6823618777ef133738861 (diff) | |
download | homer-7b622c25344622f77e3120b6a12e795821c1a26a.tar.gz homer-7b622c25344622f77e3120b6a12e795821c1a26a.tar.zst homer-7b622c25344622f77e3120b6a12e795821c1a26a.zip |
Merge branch 'master' of github.com-perso:bastienwirtz/homer20.06.1
-rw-r--r-- | Dockerfile | 9 | ||||
-rw-r--r-- | Dockerfile.arm32v7 | 9 | ||||
-rw-r--r-- | Dockerfile.arm64v8 | 9 | ||||
-rw-r--r-- | docs/tips-and-tricks.md | 14 | ||||
-rw-r--r-- | entrypoint.sh | 6 |
5 files changed, 38 insertions, 9 deletions
@@ -16,12 +16,15 @@ ENV USER darkhttpd | |||
16 | ENV GROUP darkhttpd | 16 | ENV GROUP darkhttpd |
17 | ENV GID 911 | 17 | ENV GID 911 |
18 | ENV UID 911 | 18 | ENV UID 911 |
19 | ENV PORT 8080 | ||
19 | 20 | ||
20 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ | 21 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ |
21 | apk add -U darkhttpd | 22 | apk add -U darkhttpd |
22 | 23 | ||
23 | USER ${USER} | ||
24 | |||
25 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ | 24 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ |
25 | COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh | ||
26 | 26 | ||
27 | ENTRYPOINT ["darkhttpd","/www/", "--no-listing"] \ No newline at end of file | 27 | USER ${USER} |
28 | EXPOSE ${PORT} | ||
29 | VOLUME [ "/www/config.yml", "/www/assets" ] | ||
30 | ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] | ||
diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 7664f66..ef01d1f 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 | |||
@@ -25,13 +25,16 @@ ENV USER darkhttpd | |||
25 | ENV GROUP darkhttpd | 25 | ENV GROUP darkhttpd |
26 | ENV GID 911 | 26 | ENV GID 911 |
27 | ENV UID 911 | 27 | ENV UID 911 |
28 | ENV PORT 8080 | ||
28 | 29 | ||
29 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ | 30 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ |
30 | apk add -U darkhttpd && \ | 31 | apk add -U darkhttpd && \ |
31 | rm /usr/bin/qemu-arm-static | 32 | rm /usr/bin/qemu-arm-static |
32 | 33 | ||
33 | USER ${USER} | ||
34 | |||
35 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ | 34 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ |
35 | COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh | ||
36 | 36 | ||
37 | ENTRYPOINT ["darkhttpd","/www/","--no-listing"] | 37 | USER ${USER} |
38 | EXPOSE ${PORT} | ||
39 | VOLUME [ "/www/config.yml", "/www/assets" ] | ||
40 | ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] | ||
diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index 0175341..7899027 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 | |||
@@ -25,13 +25,16 @@ ENV USER darkhttpd | |||
25 | ENV GROUP darkhttpd | 25 | ENV GROUP darkhttpd |
26 | ENV GID 911 | 26 | ENV GID 911 |
27 | ENV UID 911 | 27 | ENV UID 911 |
28 | ENV PORT 8080 | ||
28 | 29 | ||
29 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ | 30 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ |
30 | apk add -U darkhttpd && \ | 31 | apk add -U darkhttpd && \ |
31 | rm /usr/bin/qemu-aarch64-static | 32 | rm /usr/bin/qemu-aarch64-static |
32 | 33 | ||
33 | USER ${USER} | ||
34 | |||
35 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ | 34 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ |
35 | COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh | ||
36 | 36 | ||
37 | ENTRYPOINT ["darkhttpd","/www/","--no-listing"] | 37 | USER ${USER} |
38 | EXPOSE ${PORT} | ||
39 | VOLUME [ "/www/config.yml", "/www/assets" ] | ||
40 | ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] | ||
diff --git a/docs/tips-and-tricks.md b/docs/tips-and-tricks.md index 63dbde7..632b62d 100644 --- a/docs/tips-and-tricks.md +++ b/docs/tips-and-tricks.md | |||
@@ -110,3 +110,17 @@ docker create \ | |||
110 | --restart unless-stopped \ | 110 | --restart unless-stopped \ |
111 | linuxserver/code-server | 111 | linuxserver/code-server |
112 | ``` | 112 | ``` |
113 | |||
114 | |||
115 | ## Get the news headlines in Homer | ||
116 | #### `by @JamiePhonic` | ||
117 | |||
118 | Homer allows you to set a "message" that will appear at the top of the page, however, you can also supply a `url:`. | ||
119 | |||
120 | If the URL you specified returns a JSON object that defines a `title` and `content` item, homer will replace these values from your `config.yml` with the ones in the returned object. | ||
121 | |||
122 | So, using [Node-Red](https://nodered.org/docs/getting-started/) and a quick flow, you can process an RSS feed to replace the message with a news item! | ||
123 | |||
124 | To get started, simply import [this flow](https://flows.nodered.org/flow/4b6406c9a684c26ace0430dd1826e95d) into your Node-Red instance and change the RSS feed in the "Get News RSS Feed" node to one of your choosing! | ||
125 | |||
126 | So far, the flow has been tested with BBC News and Sky News, however it should be easy to modify the flow to work with other RSS feeds if they dont work out of the box! | ||
diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..7623322 --- /dev/null +++ b/entrypoint.sh | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | yes n | cp -i /www/config.yml.dist /www/config.yml | ||
4 | while true; do echo n; done | cp -Ri /app/dist/www/assets /www/assets 2>/dev/null | ||
5 | |||
6 | darkhttpd /www/ --no-listing --port $PORT | ||