From 29e546e199930310fe637e17faff4b3ed86040b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jochum?= Date: Fri, 16 Sep 2022 04:43:48 +0200 Subject: [PATCH] Add the dynamic version to the sidebar --- .drone.yml | 5 ++++- Dockerfile | 7 +++++-- build_and_run.sh | 4 ++-- content/post/20220904-rancher-traefik.md | 15 +++++++++------ layouts/partials/_widgets/copyright.html | 3 +++ 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index e3e3d7c..c23e539 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,4 +23,7 @@ steps: password: from_secret: registry.fk.jochum.dev-robot repo: registry.fk.jochum.dev/jochum/homepage - auto_tag: true \ No newline at end of file + auto_tag: true + build_args: + - HUGO_VERSION=${DRONE_TAG:1} + - URL=https://jochum.dev \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 0ba1bc9..5d7b7a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ -# Build public with hugo +# Build with selfmade hugo FROM registry.fk.jochum.dev/jochum/hugo:latest -ARG URL=https://jochum.dev +ARG HUGO_VERSION=unknown +ENV HUGO_VERSION ${HUGO_VERSION} + +ARG URL=https://example.com COPY . /build WORKDIR /build diff --git a/build_and_run.sh b/build_and_run.sh index 93fac9f..223ba05 100755 --- a/build_and_run.sh +++ b/build_and_run.sh @@ -1,3 +1,3 @@ #!/bin/sh -go get github.com/gohugoio/hugo -$GOPATH/bin/hugo server --bind="::1" -b http://localhost:1313 -v -t persona --disableFastRender +podman build --build-arg HUGO_VERSION=1.2.3-development --build-arg URL=http://localhost:8080 -t homepage:latest . +podman run --rm -p "8080:80" homepage:latest \ No newline at end of file diff --git a/content/post/20220904-rancher-traefik.md b/content/post/20220904-rancher-traefik.md index d88007a..ad9a00f 100644 --- a/content/post/20220904-rancher-traefik.md +++ b/content/post/20220904-rancher-traefik.md @@ -81,6 +81,9 @@ For me that wasn't a 5 minutes job as I had to replace [ingress-nginx](https://g kubernetesIngress: publishedService: enabled: true + allowExternalNameServices: true + kubernetesCRD: + allowExternalNameServices: true priorityClassName: "system-cluster-critical" tolerations: - key: "CriticalAddonsOnly" @@ -96,12 +99,6 @@ For me that wasn't a 5 minutes job as I had to replace [ingress-nginx](https://g http3: enabled: true additionalArguments: - - "--providers.kubernetesingress.allowexternalnameservices" - - "--providers.kubernetescrd.allowexternalnameservices" - - "--entrypoints.websecure.http3.advertisedport=443" - - "--certificatesresolvers.letsencrypt-prod.acme.tlschallenge" - - "--certificatesresolvers.letsencrypt-prod.acme.email=support@jochum.dev" - - "--certificatesresolvers.letsencrypt-prod.acme.storage=/data/acme.json" - "--certificatesresolvers.letsencrypt-prod.acme.caserver=https://acme-v02.api.letsencrypt.org/directory" image: name: traefik @@ -118,6 +115,12 @@ For me that wasn't a 5 minutes job as I had to replace [ingress-nginx](https://g enabled: true permanentRedirect: true + certResolvers: + letsencrypt-prod: + email: support@jochum.dev + tlsChallenge: true + storage: /data/acme.json + logs: # general: # format: json diff --git a/layouts/partials/_widgets/copyright.html b/layouts/partials/_widgets/copyright.html index cddf0bd..8fd6eb9 100644 --- a/layouts/partials/_widgets/copyright.html +++ b/layouts/partials/_widgets/copyright.html @@ -4,6 +4,9 @@

© 2013-2022 by RenĂ© Jochum, under a CC BY 4.0 license.

+
+

v{{ os.Getenv "HUGO_VERSION" }}

+