Compare commits

..

No commits in common. "e2666bdfadc8a0eaa2365e6e8b24e05332db7928" and "0c4eed770922f4a39e8e3814ec0f9c85afa6fc07" have entirely different histories.

7 changed files with 24 additions and 171 deletions

View file

@ -22,12 +22,3 @@ end_of_line = lf
indent_style = space indent_style = space
indent_size = 4 indent_size = 4
tab_width = 4 tab_width = 4
[Caddyfile]
indent_style = tab
indent_size = 4
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

View file

@ -53,13 +53,11 @@ services:
- PAPERLESS_OCR_LANGUAGES=deu eng - PAPERLESS_OCR_LANGUAGES=deu eng
- PAPERLESS_URL=http://paperless.${DOMAIN} - PAPERLESS_URL=http://paperless.${DOMAIN}
- PAPERLESS_OCR_LANGUAGE=deu - PAPERLESS_OCR_LANGUAGE=deu
#- PAPERLESS_FILENAME_FORMAT={correspondent}/{created} {title} - PAPERLESS_FILENAME_FORMAT={correspondent}/{created} {title}
- PAPERLESS_FILENAME_FORMAT={{ correspondent }}/{{ created }} {{ title }}
- PAPERLESS_CONSUMER_POLLING=60 - PAPERLESS_CONSUMER_POLLING=60
- USERMAP_UID=1000 - USERMAP_UID=1000
- USERMAP_GID=1000 - USERMAP_GID=1000
- PAPERLESS_PRE_CONSUME_SCRIPT=/usr/src/paperless/scripts/removePdfPassword.py - PAPERLESS_PRE_CONSUME_SCRIPT=/usr/src/paperless/scripts/removePdfPassword.py
- PAPERLESS_OCR_USER_ARGS=${USER_ARGS_JSON}
labels: labels:
- "docker.group=paperless" - "docker.group=paperless"
@ -68,4 +66,3 @@ networks:
paperless: paperless:
web: web:
external: true external: true

View file

@ -1,86 +1,44 @@
{ {
auto_https disable_redirects auto_https off
local_certs
pki {
ca local {
name "{$LOCAL_CA_NAME}"
}
}
log default {
output stdout
format console
}
} }
(errorhandler) { http://whoami.lan {
handle_errors {
root * /usr/share/caddy/web
rewrite * /error.html
templates
file_server {
status {err.status_code}
}
}
}
(localtls) {
tls internal
}
whoami.{$DOMAIN} http://whoami.{$DOMAIN} {
reverse_proxy whoami:80 reverse_proxy whoami:80
import errorhandler
} }
dashboard.{$DOMAIN} http://dashboard.{$DOMAIN} { http://dashboard.lan {
reverse_proxy homer:8080 reverse_proxy homer:8080
import errorhandler
} }
hassi.{$DOMAIN} http://hassi.{$DOMAIN} { http://hassi.lan {
# reverse_proxy homeassistant:8123 # reverse_proxy homeassistant:8123
reverse_proxy {host}:8123 reverse_proxy dockerhost-1.lan:8123
import errorhandler
} }
zigbee2mqtt.{$DOMAIN} http://zigbee2mqtt.{$DOMAIN} { http://zigbee2mqtt.lan {
reverse_proxy zigbee2mqtt:8080 reverse_proxy zigbee2mqtt:8080
import errorhandler
} }
jellyfin.{$DOMAIN} http://jellyfin.{$DOMAIN} { http://jellyfin.lan {
reverse_proxy jellyfin:8096 reverse_proxy jellyfin:8096
import errorhandler
} }
paperless.{$DOMAIN} http://paperless.{$DOMAIN} { http://paperless.lan {
reverse_proxy paperless-ngx:8000 reverse_proxy paperless-ngx:8000
import errorhandler
} }
download.{$DOMAIN} http://download.{$DOMAIN} { http://download.lan {
reverse_proxy pyload:8000 reverse_proxy pyload:8000
import errorhandler
} }
uptime.{$DOMAIN} http://uptime.{$DOMAIN} { http://uptime.lan {
reverse_proxy uptime-kuma:3001 reverse_proxy uptime-kuma:3001
import errorhandler
} }
torrent.{$DOMAIN} http://torrent.{$DOMAIN} { http://torrent.lan {
reverse_proxy transmission:9091 reverse_proxy transmission:9091
import errorhandler
} }
root-ca.{$DOMAIN} http://root-ca.{$DOMAIN} { :80, :443 {
file_server * { respond 404
root /usr/share/caddy/web
hide .git Readme.md
}
file_server /root.crt {
root /data/caddy/pki/authorities/local/
hide *.key
}
import errorhandler
} }

View file

@ -5,20 +5,12 @@ services:
restart: unless-stopped restart: unless-stopped
ports: ports:
- 80:80 - 80:80
- 443:443
- "443:443/udp"
volumes: volumes:
- ${VOLUMES_PATH}/proxy/caddy/data:/data - ${VOLUMES_PATH}/proxy/caddy/data:/data
- ${VOLUMES_PATH}/proxy/caddy/config:/config - ${VOLUMES_PATH}/proxy/caddy/config:/config
- ./Caddyfile:/etc/caddy/Caddyfile:ro - ./Caddyfile:/etc/caddy/Caddyfile:ro
- ./web:/usr/share/caddy/web:ro
networks: networks:
- web - web
environment:
- DOMAIN=${DOMAIN}
- LOCAL_CA_NAME=${LOCAL_CA_NAME}
cap_add:
- cap_net_bind_service
whoami: whoami:

View file

@ -1,13 +0,0 @@
:root {
max-width: 80ch;
padding: 3em 1em;
margin: auto;
font-size: 1.25em;
font-family: Arial, Helvetica, sans-serif;
}
footer {
position: absolute;
bottom: 0;
height: 50px;
}

View file

@ -1,72 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Containerize Root-CA</title>
<link rel="stylesheet" href="default.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1>Containerize Root-CA</h1>
<p>
Caddy dient als lokale Zertifizierungsstelle (CA) um eigene lokale Zertifikate zu signieren.
Details siehe <a href="https://caddyserver.com/docs/automatic-https#local-https">Caddy Doku</a>.
</p>
<p>
Führe folgendes aus:
<ol>
<li>
Klicken sie <a href="/root.crt" download="caddy-root-ca.crt">hier</a> um das CA-Zertifikat von Caddy herunter
zu laden.<br>
</li>
<li>
Installiere das caddy-root-ca.crt in den Windwos Truststore. <br>
Öffne die Datei mit Doppelklick und drücke "Zertifikat installieren". <br>
Wähle "Aktueller Benutzer" und den Zertifikatspeicher "Vertrauenswürdige Stammzertifizierungsstellen"
</li>
<li>
Installiere das caddy-root-ca.crt manuell in deinen Browser. Chrome benutzt den Zertifikatsspeicher vom
Betriebsystem.
</li>
<li>
Um das CA-Certifikat in den Linux-Truststore zu installieren führen Sie folgende Befehle aus:
<pre><code>curl -o caddy-root-ca.crt <span id="url">http://example.lan/</span>root.crt
sudo mkdir -p /usr/local/share/ca-certificates/extra
sudo cp caddy-root-ca.crt /usr/local/share/ca-certificates/extra/
sudo update-ca-certificates
</code>
</pre>
<script>
let url = new URL(window.location);
url.protocol = 'http:';
url.port = '80';
document.getElementById("url").innerHTML = url.toString();
</script>
</li>
<li>
Fertig.
<a>Wechsle jetzt zu https
<script>
let httpsurl = new URL(window.location);
httpsurl.protocol = 'https:';
httpsurl.port = '443';
document.currentScript.parentElement.href = httpsurl.toString();
</script>
</a>.
</li>
</ol>
</p>
</body>
</html>

View file

@ -13,7 +13,7 @@ services:
networks: networks:
- web - web
ports: ports:
- 9091:9091 # - 9091:9091
- 51413:51413 - 51413:51413
- 51413:51413/udp - 51413:51413/udp
restart: unless-stopped restart: unless-stopped