From: Bastien Wirtz Date: Mon, 25 May 2020 18:42:05 +0000 (-0700) Subject: Merge pull request #48 from issmirnov/patch-1 X-Git-Tag: 120405250~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=ab7ac44c191e3b7dea696e76b74097e23f73b18c;hp=fcf5f412a55b37033006c0c1866bc4693ca8bd57;p=github%2Fbastienwirtz%2Fhomer.git Merge pull request #48 from issmirnov/patch-1 Add "Style Options" section for bulma CSS --- diff --git a/Dockerfile b/Dockerfile index 66788b4..7621639 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,4 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} & USER darkhttpd -ENTRYPOINT ["darkhttpd","/www/"] +ENTRYPOINT ["darkhttpd","/www/", "--no-listing"] diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 new file mode 100644 index 0000000..98c6294 --- /dev/null +++ b/Dockerfile.arm32v7 @@ -0,0 +1,23 @@ +FROM alpine as qemu + +ARG QEMU_VERSION="v4.2.0-7" + +RUN wget https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-arm-static && chmod +x qemu-arm-static + +FROM arm32v7/alpine:3.11 + +COPY --from=qemu qemu-arm-static /usr/bin/ +COPY ./ /www/ + +ENV USER darkhttpd +ENV GROUP darkhttpd +ENV GID 911 +ENV UID 911 + +RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ + apk add -U darkhttpd && \ + rm /usr/bin/qemu-arm-static + +USER darkhttpd + +ENTRYPOINT ["darkhttpd","/www/","--no-listing"] diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 new file mode 100644 index 0000000..48ce48e --- /dev/null +++ b/Dockerfile.arm64v8 @@ -0,0 +1,23 @@ +FROM alpine as qemu + +ARG QEMU_VERSION="v4.2.0-7" + +RUN wget https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-aarch64-static && chmod +x qemu-aarch64-static + +FROM arm64v8/alpine:3.11 + +COPY --from=qemu qemu-aarch64-static /usr/bin/ +COPY ./ /www/ + +ENV USER darkhttpd +ENV GROUP darkhttpd +ENV GID 911 +ENV UID 911 + +RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ + apk add -U darkhttpd && \ + rm /usr/bin/qemu-aarch64-static + +USER darkhttpd + +ENTRYPOINT ["darkhttpd","/www/","--no-listing"] diff --git a/README.md b/README.md index 827226b..f03152b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Homer + A dead simple static **HOM**epage for your serv**ER** to keep your services on hand, from a simple `yaml` configuration file. **Check out the live demo [here](https://homer-demo.netlify.app).** @@ -16,9 +17,9 @@ If you need authentication support, you're on your own (it can be secured using ## Roadmap -- [ ] Colors / theme customization -- [ ] Enable PWA support (making possible to "install" - add to homescreen - it) -- [ ] Improve maintenability (external library import & service workers cached file list.) +* [ ] Colors / theme customization +* [ ] Enable PWA support (making possible to "install" - add to homescreen - it) +* [ ] Improve maintainability (external library import & service workers cached file list.) ## Installation @@ -32,12 +33,10 @@ sudo docker run -p 8080:8080 -v /your/local/config.yml:/www/config.yml -v /your/ **How to build / install it?** There is no build system (😱), use it like that! It's meant to be stupid simple & zero maintenance required. Just copy the static files somewhere, and visit the `index.html`. - ## Configuration Title, icons, links, colors, and services can be configured in the `config.yml` file, using [yaml](http://yaml.org/) format. - ```yaml --- # Homepage configuration @@ -63,7 +62,7 @@ links: - name: "ansible" icon: "fab fa-github" url: "https://github.com/xxxxx/ansible/" - target: '_blank' # optionnal html a tag target attribute + target: '_blank' # optional html a tag target attribute - name: "Wiki" icon: "fas fa-book" url: "https://wiki.xxxxxx.com/" @@ -82,7 +81,7 @@ services: subtitle: "Continuous integration server" tag: "CI" url: "#" - target: '_blank' # optionnal html a tag target attribute + target: '_blank' # optional html a tag target attribute - name: "RabbitMQ Management" logo: "/assets/tools/rabbitmq.png" subtitle: "Manage & monitor RabbitMQ server" @@ -119,9 +118,9 @@ If you choose to fetch message information from an endpoint, the output format s ```json { - "style": null, - "title": "Lorem ipsum 42", - "content": "LA LA LA Lorem ipsum dolor sit amet, ....." + "style": null, + "title": "Lorem ipsum 42", + "content": "LA LA LA Lorem ipsum dolor sit amet, ....." } ``` diff --git a/app.js b/app.js index e796110..9e6bdd9 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,7 @@ const app = new Vue({ this.checkOffline(); try { this.config = await this.getConfig(); - document.title = this.config.title + ' | Homer'; + document.title = this.config.title + ' | ' + this.config.subtitle; } catch (error) { this.offline = true; } diff --git a/config.yml b/config.yml index 71915ce..c5231c4 100644 --- a/config.yml +++ b/config.yml @@ -21,7 +21,7 @@ links: - name: "ansible" icon: "fab fa-github" url: "https://github.com/bastienwirtz/homer" - target: '_blank' # optionnal html a tag target attribute + target: '_blank' # optional html a tag target attribute - name: "Wiki" icon: "fas fa-book" url: "https://www.wikipedia.org/" @@ -38,7 +38,7 @@ services: subtitle: "Continuous integration server" tag: "CI" url: "https://jenkins.io/" - target: '_blank' # optionnal html a tag target attribute + target: '_blank' # optional html a tag target attribute - name: "RabbitMQ Management" logo: "assets/tools/rabbitmq.png" subtitle: "Manage & monitor RabbitMQ server" diff --git a/hooks/post_push b/hooks/post_push new file mode 100644 index 0000000..d721b68 --- /dev/null +++ b/hooks/post_push @@ -0,0 +1,7 @@ +#!/bin/bash + +docker manifest push --purge b4bz/homer:latest +docker manifest create b4bz/homer:latest b4bz/homer:latest-amd64 b4bz/homer:latest-arm32v7 b4bz/homer:latest-arm64v8 +docker manifest annotate b4bz/homer:latest b4bz/homer:latest-arm32v7 --os linux --arch arm +docker manifest annotate b4bz/homer:latest b4bz/homer:latest-arm64v8 --os linux --arch arm64 --variant v8 +docker manifest push --purge b4bz/homer:latest \ No newline at end of file diff --git a/hooks/pre_build b/hooks/pre_build new file mode 100644 index 0000000..bc1b6fe --- /dev/null +++ b/hooks/pre_build @@ -0,0 +1,8 @@ +#!/bin/bash + +# Update to docker-ee 18.x for manifests +apt-get -y update +apt-get -y --only-upgrade install docker-ee +# Register qemu-*-static for all supported processors except the +# current one, but also remove all registered binfmt_misc before +docker run --rm --privileged multiarch/qemu-user-static:register --reset \ No newline at end of file