]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
Merge pull request #48 from issmirnov/patch-1
authorBastien Wirtz <bastien.wirtz@gmail.com>
Mon, 25 May 2020 18:42:05 +0000 (11:42 -0700)
committerGitHub <noreply@github.com>
Mon, 25 May 2020 18:42:05 +0000 (11:42 -0700)
Add "Style Options" section for bulma CSS

Dockerfile
Dockerfile.arm32v7 [new file with mode: 0644]
Dockerfile.arm64v8 [new file with mode: 0644]
README.md
app.js
config.yml
hooks/post_push [new file with mode: 0644]
hooks/pre_build [new file with mode: 0644]

index 66788b483963f6d583e53426c1bc24f32152b6f6..7621639c17956b6c95fdf5147fad9877d484daea 100644 (file)
@@ -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 (file)
index 0000000..98c6294
--- /dev/null
@@ -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 (file)
index 0000000..48ce48e
--- /dev/null
@@ -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"]
index 827226b9ccc3d8bcebba583c245afb7de91fa0bb..f03152b0cef3d46c4344f27a746f641c9e15ae55 100644 (file)
--- 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 e79611069f9d779d4a09e969157ec805b0c24628..9e6bdd9a12d813efec730f25613701cb41a45389 100644 (file)
--- 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;
         }
index 71915ce155318de32e977f02d62919719ddb9603..c5231c43c0080b187ddf7b87d99537e9d4f4357b 100644 (file)
@@ -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 (file)
index 0000000..d721b68
--- /dev/null
@@ -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 (file)
index 0000000..bc1b6fe
--- /dev/null
@@ -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