From e5a87f2804c6a9450a13a7c0dbc0abb662181026 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 25 Sep 2022 17:54:54 -0600 Subject: [PATCH] Add wallart --- homelab/Caddyfile | 25 ++- homelab/browse.html | 20 -- homelab/docker-compose.yaml | 18 +- homelab/www/browse.html | 415 +++++++++++++++++++++++++++++++++++ homelab/{ => www}/index.html | 1 + 5 files changed, 446 insertions(+), 33 deletions(-) delete mode 100644 homelab/browse.html create mode 100644 homelab/www/browse.html rename homelab/{ => www}/index.html (93%) diff --git a/homelab/Caddyfile b/homelab/Caddyfile index 9a4b3d7..3748c21 100644 --- a/homelab/Caddyfile +++ b/homelab/Caddyfile @@ -1,8 +1,5 @@ { email neale@woozle.org - - # Uncomment to use testing CA - #acme_ca https://acme-staging-v02.api.letsencrypt.org/directory } (restricted-access) { @@ -43,15 +40,12 @@ deergrove.woozle.org, sweetums.woozle.org { import restricted-access reverse_proxy host.docker.internal:9091 } + handle_path /sucker/* { import restricted-access reverse_proxy host.docker.internal:5880 } - handle_path /public/* { - file_server { - root /srv/ext/storage/public - } - } + handle_path /octoprint/* { import restricted-access reverse_proxy { @@ -59,6 +53,7 @@ deergrove.woozle.org, sweetums.woozle.org { header_up X-Script-Name "/octoprint" } } + handle /webcam/* { # Octoprint doesn't properly prefix webcam URLs import restricted-access @@ -66,6 +61,20 @@ deergrove.woozle.org, sweetums.woozle.org { to 192.168.86.36:80 } } + + handle_path /wallart/* { + reverse_proxy { + to wallart:8080 + } + } + rewrite /public/wallart.bin /wallart/wallart.bin + + handle_path /public/* { + file_server { + root /srv/ext/storage/public + } + } + handle { import restricted-access file_server { diff --git a/homelab/browse.html b/homelab/browse.html deleted file mode 100644 index c02eac8..0000000 --- a/homelab/browse.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - {{html .Name}} - - - - - - - - - - diff --git a/homelab/docker-compose.yaml b/homelab/docker-compose.yaml index 744f9b0..22fdb02 100644 --- a/homelab/docker-compose.yaml +++ b/homelab/docker-compose.yaml @@ -85,6 +85,13 @@ services: target: /etc/localtime read_only: true + wallart: + image: wallart-server + volumes: + - type: bind + source: /srv/ext/sys/wallart + target: /cache + atlas: image: ctassisf/ripe-atlas-alpine:arm64v8 volumes: @@ -150,13 +157,14 @@ configs: name: dave.yaml-v3 Caddyfile: file: Caddyfile - name: Caddyfile-v37 + name: Caddyfile-v40 index.html: - file: index.html - name: index.html-v12 + file: www/index.html + name: index.html-v16 browse.html: - file: browse.html - name: browse.html-v4 + file: www/browse.html + name: browse.html-v5 + secrets: passwd: diff --git a/homelab/www/browse.html b/homelab/www/browse.html new file mode 100644 index 0000000..7ce46f7 --- /dev/null +++ b/homelab/www/browse.html @@ -0,0 +1,415 @@ + + + + {{html .Name}} + + + + + +
+

+ {{range $i, $crumb := .Breadcrumbs}}{{html $crumb.Text}}{{if ne $i 0}}/{{end}}{{end}} +

+
+
+
+
+ {{.NumDirs}} director{{if eq 1 .NumDirs}}y{{else}}ies{{end}} + {{.NumFiles}} file{{if ne 1 .NumFiles}}s{{end}} + {{- if ne 0 .Limit}} + (of which only {{.Limit}} are displayed) + {{- end}} + +
+
+
+ + + + + + + + + + + + {{- if .CanGoUp}} + + + + + + + + {{- end}} + {{- range .Items}} + + + + {{- if .IsDir}} + + {{- else}} + + {{- end}} + + + + {{- end}} + +
+ {{- if and (eq .Sort "namedirfirst") (ne .Order "desc")}} + ⬆️ + {{- else if and (eq .Sort "namedirfirst") (ne .Order "asc")}} + ⬇️ + {{- else}} + ↕️ + {{- end}} + + {{- if and (eq .Sort "name") (ne .Order "desc")}} + Name ⬆️ + {{- else if and (eq .Sort "name") (ne .Order "asc")}} + Name ⬇️ + {{- else}} + Name + {{- end}} + + {{- if and (eq .Sort "size") (ne .Order "desc")}} + Size ⬆️ + {{- else if and (eq .Sort "size") (ne .Order "asc")}} + Size ⬇️ + {{- else}} + Size + {{- end}} + + {{- if and (eq .Sort "time") (ne .Order "desc")}} + Modified ⬆️ + {{- else if and (eq .Sort "time") (ne .Order "asc")}} + Modified ⬇️ + {{- else}} + Modified + {{- end}} +
+ + Go up + +
+ + {{- if .IsDir}}📁{{else}}📄{{end -}} + {{html .Name}} + + {{.HumanSize}}
+
+
+ + + + diff --git a/homelab/index.html b/homelab/www/index.html similarity index 93% rename from homelab/index.html rename to homelab/www/index.html index 1a3eaa0..4103b43 100644 --- a/homelab/index.html +++ b/homelab/www/index.html @@ -21,6 +21,7 @@
  • 💿 Media Sucker: DVD/CD ripper
  • 📥 Transmission: BitTorrent
  • 🖨️ Octoprint: 3d Printer
  • +
  • 🖼️ Wall Art Uploader