Compare commits
126 Commits
61820fe772
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 56b7d065b8 | |||
| 96348c17ce | |||
| 02b721ff51 | |||
| 3a628fe676 | |||
| 93535750a2 | |||
| c949457f4c | |||
| 5292e2728f | |||
| 8c1770882b | |||
| 6837cf4f17 | |||
| 5c61a74e3d | |||
| ffe6bdd0f4 | |||
| f391e35221 | |||
| 9f88b58f96 | |||
| 9d32e0962e | |||
| 4d3ca7bb14 | |||
| 27f929dfbc | |||
| be0642c389 | |||
| 69af529410 | |||
| c4d8e980da | |||
| 676e0a91b6 | |||
| d626b19e4a | |||
| 8efc6bfcd2 | |||
| 7fcc380b0f | |||
| 38e327c847 | |||
| 5e8559ec97 | |||
| 2ee5fc8842 | |||
| 9e107cb96c | |||
| 0ef8eb0938 | |||
| 05aac691b3 | |||
| de57180976 | |||
| 45ae435223 | |||
| 6cd4371829 | |||
| eec4458604 | |||
| 4e2369f35c | |||
| c73b400f52 | |||
| c6ee22ef12 | |||
| 4842bd7f03 | |||
| 6f289424e3 | |||
| 900ae6c257 | |||
| 8ef9420396 | |||
| 2dd1dc21b6 | |||
| 0794242198 | |||
| d926064493 | |||
| 0d6bf386d0 | |||
| 3ad3ab38c8 | |||
| 200567f23c | |||
| ab4958dfa2 | |||
| aa75224d03 | |||
| 4530a2f80e | |||
| 83ae97e627 | |||
| fa2ef2b743 | |||
| 7f9042e612 | |||
| 2cfa226361 | |||
| d37109a696 | |||
| 4f7dc6f8b4 | |||
| afdd3d903a | |||
| 6c6b4d345f | |||
| 28741de633 | |||
| 7d1c0b9a6d | |||
| 38b425e1d8 | |||
| b3d184259e | |||
| dfddc38c89 | |||
| 29e35bfad6 | |||
| fe9651409e | |||
| 9438eeaa75 | |||
| 286619fc62 | |||
| 969aec9278 | |||
| 1bb297f0cf | |||
| 5dc09a5651 | |||
| d0af616b8d | |||
| 7cbbaedd5e | |||
| 9acc06646a | |||
| f541ea9248 | |||
| 96fa643095 | |||
| c70f031dff | |||
| 7e3fac6907 | |||
| c24049d3fb | |||
| f340cc0a43 | |||
| 9dd22589de | |||
| 4a5222a781 | |||
| f79dde2d1d | |||
| 1b899985a1 | |||
| f0096bc27f | |||
| 39d50b7d3b | |||
| 824fbbe3eb | |||
| 1968faab99 | |||
| 3d961d6536 | |||
| 5469a01893 | |||
| 1bf893f683 | |||
| a2c4ac8685 | |||
| 08489162bf | |||
| 92afa46d5d | |||
| 0f29d06653 | |||
| a22a30ac3b | |||
| 9b490a9233 | |||
| bf5569522a | |||
| 3c84604de8 | |||
| 38a1a08c2a | |||
| ee26c3dc0a | |||
| 6331391f1c | |||
| ee3e5952ac | |||
| 541059c0c4 | |||
| ac68074178 | |||
| ce0b44ac9c | |||
| 3553cdcf59 | |||
| 14f6b30444 | |||
| 96f3ccbc1a | |||
| 669ef1b220 | |||
| ee235d5863 | |||
| dde2134d87 | |||
| 57ec03cebe | |||
| 082c465985 | |||
| 8b5b984d22 | |||
| 212fa09534 | |||
| f66016633e | |||
| b10f49a283 | |||
| 379cc87257 | |||
| ceaf82d5da | |||
| dfadc74b2d | |||
| 7692aef4fc | |||
| 973be97c70 | |||
| bd38b9a5f2 | |||
| e96631bafd | |||
| 77ec9800aa | |||
| 4c34709526 | |||
| b8e3cb6e1f |
@@ -4,7 +4,7 @@ services:
|
|||||||
container_name: bizmatch-app-prod # Neu: Unterscheide Namen
|
container_name: bizmatch-app-prod # Neu: Unterscheide Namen
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
volumes:
|
volumes:
|
||||||
- ~/git/bizmatch-project-prod/bizmatch-server:/app # Verwende Prod-Checkout
|
- /home/aknuth/git/bizmatch-project-prod/bizmatch-server:/app # Verwende Prod-Checkout
|
||||||
ports:
|
ports:
|
||||||
- "3001:3000" # Neu: Host-Port 3001, Container-Port bleibt 3000
|
- "3001:3000" # Neu: Host-Port 3001, Container-Port bleibt 3000
|
||||||
env_file:
|
env_file:
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
257
caddy/Caddyfile
257
caddy/Caddyfile
@@ -4,21 +4,28 @@
|
|||||||
acme_ca https://acme-v02.api.letsencrypt.org/directory
|
acme_ca https://acme-v02.api.letsencrypt.org/directory
|
||||||
debug
|
debug
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prod: Neue Domains
|
# Prod: Neue Domains
|
||||||
www.bizmatch.net {
|
www.bizmatch.net {
|
||||||
handle /pictures/* {
|
handle /pictures/* {
|
||||||
root * /home/aknuth/git/bizmatch-project/bizmatch-server # Prod-Ordner
|
root * /home/aknuth/git/bizmatch-project/bizmatch-server # Prod-Ordner
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
|
# Statische Dateien (CSS, JS, Bilder) – lange cachen, da sich der Name bei Änderungen ändert
|
||||||
|
header /assets/* Cache-Control "public, max-age=31536000, immutable"
|
||||||
|
header /*.css Cache-Control "public, max-age=31536000, immutable"
|
||||||
|
header /*.js Cache-Control "public, max-age=31536000, immutable"
|
||||||
|
|
||||||
|
# Die index.html und API-Antworten – NIEMALS cachen
|
||||||
|
header /index.html Cache-Control "no-cache, no-store, must-revalidate"
|
||||||
|
|
||||||
handle {
|
handle {
|
||||||
root * /home/aknuth/git/bizmatch-project-prod/bizmatch/dist/bizmatch/browser # Neuer Prod-Dist-Ordner
|
reverse_proxy host.docker.internal:4200
|
||||||
try_files {path} {path}/ /index.html
|
|
||||||
file_server
|
|
||||||
}
|
}
|
||||||
log {
|
log {
|
||||||
output file /var/log/caddy/access.prod.log # Separate Logs
|
output file /var/log/caddy/access.prod.log # Separate Logs
|
||||||
}
|
}
|
||||||
encode gzip
|
encode gzip zstd
|
||||||
}
|
}
|
||||||
bizmatch.net {
|
bizmatch.net {
|
||||||
redir https://www.bizmatch.net{uri} permanent
|
redir https://www.bizmatch.net{uri} permanent
|
||||||
@@ -36,111 +43,20 @@ www.qrmaster.net {
|
|||||||
qrmaster.net {
|
qrmaster.net {
|
||||||
redir https://www.qrmaster.net{uri} permanent
|
redir https://www.qrmaster.net{uri} permanent
|
||||||
}
|
}
|
||||||
bayarea-cc.com {
|
www.innungsapp.com {
|
||||||
# TLS-Direktive entfernen, falls Cloudflare die Verbindung terminiert
|
|
||||||
# tls {
|
|
||||||
# dns cloudflare {env.CLOUDFLARE_API_TOKEN}
|
|
||||||
# }
|
|
||||||
|
|
||||||
handle /api {
|
|
||||||
reverse_proxy host.docker.internal:3001
|
|
||||||
}
|
|
||||||
handle {
|
|
||||||
root * /app
|
|
||||||
try_files {path} /index.html
|
|
||||||
file_server
|
|
||||||
}
|
|
||||||
log {
|
|
||||||
output stderr
|
|
||||||
format console
|
|
||||||
}
|
|
||||||
encode gzip
|
|
||||||
}
|
|
||||||
www.bayarea-cc.com {
|
|
||||||
redir https://bayarea-cc.com{uri} permanent
|
|
||||||
}
|
|
||||||
fancytextstuff.com {
|
|
||||||
# wenn du API innerhalb von Next bedienst, weiterleiten an den Next Prozess
|
|
||||||
handle {
|
handle {
|
||||||
reverse_proxy host.docker.internal:3010
|
reverse_proxy host.docker.internal:3010
|
||||||
}
|
}
|
||||||
log {
|
log {
|
||||||
output file /var/log/caddy/fancytext.log
|
output file /var/log/caddy/innungsapp.log
|
||||||
format console
|
format console
|
||||||
}
|
}
|
||||||
encode gzip
|
encode gzip
|
||||||
}
|
}
|
||||||
cielectrical.bayarea-cc.com {
|
innungsapp.com {
|
||||||
# wenn du API innerhalb von Next bedienst, weiterleiten an den Next Prozess
|
redir https://www.innungsapp.com{uri} permanent
|
||||||
handle {
|
|
||||||
reverse_proxy host.docker.internal:3000
|
|
||||||
}
|
|
||||||
log {
|
|
||||||
output file /var/log/caddy/cielectrical.log
|
|
||||||
format console
|
|
||||||
}
|
|
||||||
encode gzip
|
|
||||||
}
|
|
||||||
hamptonbrown.bayarea-cc.com {
|
|
||||||
# wenn du API innerhalb von Next bedienst, weiterleiten an den Next Prozess
|
|
||||||
handle {
|
|
||||||
reverse_proxy host.docker.internal:3010
|
|
||||||
}
|
|
||||||
log {
|
|
||||||
output file /var/log/caddy/hamptonbrown.log
|
|
||||||
format console
|
|
||||||
}
|
|
||||||
encode gzip
|
|
||||||
}
|
|
||||||
nqsltd.bayarea-cc.com {
|
|
||||||
# wenn du API innerhalb von Next bedienst, weiterleiten an den Next Prozess
|
|
||||||
handle {
|
|
||||||
reverse_proxy host.docker.internal:3020
|
|
||||||
}
|
|
||||||
log {
|
|
||||||
output file /var/log/caddy/nqsltd.log
|
|
||||||
format console
|
|
||||||
}
|
|
||||||
encode gzip
|
|
||||||
}
|
|
||||||
gregknoppcpa.bayarea-cc.com {
|
|
||||||
# wenn du API innerhalb von Next bedienst, weiterleiten an den Next Prozess
|
|
||||||
handle {
|
|
||||||
reverse_proxy host.docker.internal:3030
|
|
||||||
}
|
|
||||||
log {
|
|
||||||
output file /var/log/caddy/gregknoppcpa.log
|
|
||||||
format console
|
|
||||||
}
|
|
||||||
encode gzip
|
|
||||||
}
|
}
|
||||||
|
|
||||||
iitwelders.bayarea-cc.com {
|
|
||||||
# wenn du API innerhalb von Next bedienst, weiterleiten an den Next Prozess
|
|
||||||
handle {
|
|
||||||
reverse_proxy host.docker.internal:8080
|
|
||||||
}
|
|
||||||
log {
|
|
||||||
output file /var/log/caddy/iitwelders.log
|
|
||||||
format console
|
|
||||||
}
|
|
||||||
encode gzip
|
|
||||||
}
|
|
||||||
|
|
||||||
s3mail.bayarea-cc.com {
|
|
||||||
# wenn du API innerhalb von Next bedienst, weiterleiten an den Next Prozess
|
|
||||||
handle {
|
|
||||||
reverse_proxy host.docker.internal:3060
|
|
||||||
}
|
|
||||||
log {
|
|
||||||
output file /var/log/caddy/s3mail.log
|
|
||||||
format console
|
|
||||||
}
|
|
||||||
encode gzip
|
|
||||||
}
|
|
||||||
www.fancytextstuff.com {
|
|
||||||
redir https://fancytextstuff.com{uri} permanent
|
|
||||||
}
|
|
||||||
auth.bizmatch.net {
|
auth.bizmatch.net {
|
||||||
reverse_proxy https://bizmatch-net.firebaseapp.com {
|
reverse_proxy https://bizmatch-net.firebaseapp.com {
|
||||||
header_up Host bizmatch-net.firebaseapp.com
|
header_up Host bizmatch-net.firebaseapp.com
|
||||||
@@ -153,31 +69,6 @@ gitea.bizmatch.net {
|
|||||||
reverse_proxy gitea:3500
|
reverse_proxy gitea:3500
|
||||||
}
|
}
|
||||||
|
|
||||||
dev.bizmatch.net {
|
|
||||||
handle /pictures/* {
|
|
||||||
root * /home/aknuth/git/bizmatch-project/bizmatch-server
|
|
||||||
file_server
|
|
||||||
}
|
|
||||||
|
|
||||||
handle {
|
|
||||||
root * /home/aknuth/git/bizmatch-project/bizmatch/dist/bizmatch/browser
|
|
||||||
try_files {path} {path}/ /index.html
|
|
||||||
file_server
|
|
||||||
}
|
|
||||||
|
|
||||||
log {
|
|
||||||
output file /var/log/caddy/access.log {
|
|
||||||
roll_size 10MB
|
|
||||||
roll_keep 5
|
|
||||||
roll_keep_for 48h
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
encode gzip
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
api.bizmatch.net {
|
api.bizmatch.net {
|
||||||
reverse_proxy host.docker.internal:3001 { # Neu: Proxy auf Prod-Port 3001
|
reverse_proxy host.docker.internal:3001 { # Neu: Proxy auf Prod-Port 3001
|
||||||
header_up X-Real-IP {http.request.header.CF-Connecting-IP}
|
header_up X-Real-IP {http.request.header.CF-Connecting-IP}
|
||||||
@@ -186,120 +77,22 @@ api.bizmatch.net {
|
|||||||
header_up CF-IPCountry {http.request.header.CF-IPCountry}
|
header_up CF-IPCountry {http.request.header.CF-IPCountry}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mailsync.bizmatch.net {
|
|
||||||
reverse_proxy host.docker.internal:5000 {
|
|
||||||
header_up X-Real-IP {http.request.header.CF-Connecting-IP}
|
|
||||||
header_up X-Forwarded-For {http.request.header.CF-Connecting-IP}
|
|
||||||
header_up X-Forwarded-Proto {http.request.header.X-Forwarded-Proto}
|
|
||||||
header_up CF-IPCountry {http.request.header.CF-IPCountry}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Roundcube für docker-mailserver
|
greenlenspro.com {
|
||||||
app.email-bayarea.com {
|
encode zstd gzip
|
||||||
reverse_proxy roundcube-new:80
|
|
||||||
|
|
||||||
log {
|
@storage path /storage /storage/*
|
||||||
output stderr
|
handle @storage {
|
||||||
format console
|
uri strip_prefix /storage
|
||||||
|
reverse_proxy minio:9000
|
||||||
}
|
}
|
||||||
|
|
||||||
encode gzip
|
@api path /api /api/* /auth /auth/* /v1 /v1/* /health /plants /plants/*
|
||||||
}
|
handle @api {
|
||||||
# Roundcube für docker-mailserver
|
reverse_proxy api:3000
|
||||||
config.email-bayarea.com {
|
|
||||||
|
|
||||||
root * /home/aknuth/git/config-email/frontend/dist
|
|
||||||
try_files {path} {path}/ /index.html
|
|
||||||
file_server
|
|
||||||
|
|
||||||
log {
|
|
||||||
output file /var/log/caddy/config-email.log
|
|
||||||
}
|
}
|
||||||
|
|
||||||
encode gzip
|
|
||||||
}
|
|
||||||
# Roundcube für docker-mailserver
|
|
||||||
api.email-bayarea.com {
|
|
||||||
reverse_proxy host.docker.internal:3002
|
|
||||||
|
|
||||||
log {
|
|
||||||
output stderr
|
|
||||||
format console
|
|
||||||
}
|
|
||||||
|
|
||||||
encode gzip
|
|
||||||
}
|
|
||||||
# IMAP/SMTP Server für E-Mail-Clients
|
|
||||||
email-srvr.com {
|
|
||||||
# Für E-Mail-Client-Konfiguration (Autodiscover)
|
|
||||||
handle /.well-known/autoconfig/mail/config-v1.1.xml {
|
|
||||||
header Content-Type "application/xml"
|
|
||||||
respond `<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<clientConfig version="1.1">
|
|
||||||
<emailProvider id="email-srvr.com">
|
|
||||||
<domain>andreasknuth.de</domain>
|
|
||||||
<displayName>Andreas Knuth Mail</displayName>
|
|
||||||
<displayShortName>AK Mail</displayShortName>
|
|
||||||
<incomingServer type="imap">
|
|
||||||
<hostname>email-srvr.com</hostname>
|
|
||||||
<port>993</port>
|
|
||||||
<socketType>SSL</socketType>
|
|
||||||
<authentication>password-cleartext</authentication>
|
|
||||||
<username>%EMAILADDRESS%</username>
|
|
||||||
</incomingServer>
|
|
||||||
<outgoingServer type="smtp">
|
|
||||||
<hostname>email-srvr.com</hostname>
|
|
||||||
<port>587</port>
|
|
||||||
<socketType>STARTTLS</socketType>
|
|
||||||
<authentication>password-cleartext</authentication>
|
|
||||||
<username>%EMAILADDRESS%</username>
|
|
||||||
</outgoingServer>
|
|
||||||
</emailProvider>
|
|
||||||
</clientConfig>`
|
|
||||||
}
|
|
||||||
|
|
||||||
# Fallback für andere Anfragen
|
|
||||||
handle {
|
handle {
|
||||||
respond "Mail Server Configuration" 200
|
reverse_proxy landing:3000
|
||||||
}
|
|
||||||
|
|
||||||
log {
|
|
||||||
output stderr
|
|
||||||
format console
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
annavillesda.org {
|
|
||||||
# API requests to backend
|
|
||||||
handle /api/* {
|
|
||||||
reverse_proxy host.docker.internal:3070
|
|
||||||
}
|
|
||||||
|
|
||||||
# Frontend static files
|
|
||||||
handle {
|
|
||||||
root * /home/aknuth/git/annaville-sda-site/dist
|
|
||||||
try_files {path} {path}/ /index.html
|
|
||||||
file_server
|
|
||||||
}
|
|
||||||
|
|
||||||
log {
|
|
||||||
output file /var/log/caddy/access.prod.log
|
|
||||||
}
|
|
||||||
|
|
||||||
encode gzip
|
|
||||||
}
|
|
||||||
www.annavillesda.org {
|
|
||||||
redir https://annavillesda.org{uri} permanent
|
|
||||||
}
|
|
||||||
# -----------------
|
|
||||||
# just for certificate generation
|
|
||||||
# -----------------
|
|
||||||
mail.andreasknuth.de {
|
|
||||||
reverse_proxy nginx-mailcow:8080
|
|
||||||
}
|
|
||||||
web.email-bayarea.com {
|
|
||||||
reverse_proxy nginx-mailcow:8080
|
|
||||||
}
|
|
||||||
mail.email-srvr.com autodiscover.mail.email-srvr.com autoconfig.mail.email-srvr.com {
|
|
||||||
reverse_proxy nginx-mailcow:8080
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
caddy:
|
caddy:
|
||||||
image: custom-caddy:2.9.1-rr1
|
image: custom-caddy:2.9.1-rr1
|
||||||
|
container_name: caddy
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.caddy
|
dockerfile: Dockerfile.caddy
|
||||||
@@ -15,8 +16,12 @@ services:
|
|||||||
- keycloak
|
- keycloak
|
||||||
- gitea
|
- gitea
|
||||||
- mail_network
|
- mail_network
|
||||||
|
- greenlens_net
|
||||||
volumes:
|
volumes:
|
||||||
- $PWD/Caddyfile:/etc/caddy/Caddyfile
|
- $PWD/Caddyfile:/etc/caddy/Caddyfile
|
||||||
|
- $PWD/email_autodiscover:/etc/caddy/email_autodiscover
|
||||||
|
- $PWD/email.mobileconfig.tpl:/etc/caddy/email.mobileconfig.tpl
|
||||||
|
- $PWD/email-setup:/var/www/email-setup
|
||||||
- caddy_data:/data
|
- caddy_data:/data
|
||||||
- caddy_config:/config
|
- caddy_config:/config
|
||||||
- /home/aknuth/git/bizmatch-project/bizmatch/dist/bizmatch/browser:/home/aknuth/git/bizmatch-project/bizmatch/dist/bizmatch/browser
|
- /home/aknuth/git/bizmatch-project/bizmatch/dist/bizmatch/browser:/home/aknuth/git/bizmatch-project/bizmatch/dist/bizmatch/browser
|
||||||
@@ -40,6 +45,8 @@ networks:
|
|||||||
external: true
|
external: true
|
||||||
mail_network:
|
mail_network:
|
||||||
external: true
|
external: true
|
||||||
|
greenlens_net:
|
||||||
|
external: true
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
caddy_data:
|
caddy_data:
|
||||||
|
|||||||
29
caddy/email-setup/autodiscover.xml
Normal file
29
caddy/email-setup/autodiscover.xml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
|
||||||
|
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
|
||||||
|
<Account>
|
||||||
|
<AccountType>email</AccountType>
|
||||||
|
<Action>settings</Action>
|
||||||
|
<Protocol>
|
||||||
|
<Type>IMAP</Type>
|
||||||
|
<Server>mail.email-srvr.com</Server>
|
||||||
|
<Port>993</Port>
|
||||||
|
<DomainRequired>off</DomainRequired>
|
||||||
|
<LoginName></LoginName>
|
||||||
|
<SPA>off</SPA>
|
||||||
|
<SSL>on</SSL>
|
||||||
|
<AuthRequired>on</AuthRequired>
|
||||||
|
</Protocol>
|
||||||
|
<Protocol>
|
||||||
|
<Type>SMTP</Type>
|
||||||
|
<Server>mail.email-srvr.com</Server>
|
||||||
|
<Port>465</Port>
|
||||||
|
<DomainRequired>off</DomainRequired>
|
||||||
|
<LoginName></LoginName>
|
||||||
|
<SPA>off</SPA>
|
||||||
|
<SSL>on</SSL>
|
||||||
|
<AuthRequired>on</AuthRequired>
|
||||||
|
</Protocol>
|
||||||
|
</Account>
|
||||||
|
</Response>
|
||||||
|
</Autodiscover>
|
||||||
BIN
caddy/email-setup/logo.png
Normal file
BIN
caddy/email-setup/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
122
caddy/email-setup/setup.html
Normal file
122
caddy/email-setup/setup.html
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Email Setup</title>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
|
||||||
|
<style>
|
||||||
|
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: #f2f2f7; display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; padding: 20px; box-sizing: border-box; }
|
||||||
|
.card { background: white; padding: 2.5rem; border-radius: 24px; box-shadow: 0 12px 30px rgba(0,0,0,0.1); width: 100%; max-width: 420px; text-align: center; transition: all 0.3s ease; }
|
||||||
|
.logo { width: 80px; height: 80px; margin-bottom: 1.5rem; }
|
||||||
|
h1 { margin: 0 0 1rem 0; color: #1a1a1a; font-size: 1.8rem; }
|
||||||
|
p { color: #666; line-height: 1.5; margin-bottom: 2rem; }
|
||||||
|
|
||||||
|
/* Input Section */
|
||||||
|
#input-section { transition: opacity 0.3s ease; }
|
||||||
|
input { width: 100%; padding: 16px; margin-bottom: 16px; border: 2px solid #eee; border-radius: 14px; font-size: 16px; box-sizing: border-box; transition: border-color 0.2s; outline: none; }
|
||||||
|
input:focus { border-color: #007AFF; }
|
||||||
|
button { width: 100%; padding: 16px; background: #007AFF; color: white; border: none; border-radius: 14px; font-size: 18px; font-weight: 600; cursor: pointer; transition: background 0.2s, transform 0.1s; }
|
||||||
|
button:hover { background: #0062cc; }
|
||||||
|
button:active { transform: scale(0.98); }
|
||||||
|
|
||||||
|
/* QR Section (initially hidden) */
|
||||||
|
#qr-section { display: none; opacity: 0; transition: opacity 0.5s ease; }
|
||||||
|
#qrcode { margin: 2rem auto; padding: 15px; background: white; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); display: inline-block; }
|
||||||
|
#qrcode img { margin: auto; } /* Centers the generated QR code */
|
||||||
|
|
||||||
|
.hint { font-size: 0.9rem; color: #888; margin-top: 1.5rem; }
|
||||||
|
.hint strong { color: #333; }
|
||||||
|
.error { color: #d32f2f; background: #fde8e8; padding: 10px; border-radius: 8px; font-size: 0.9rem; display: none; margin-bottom: 16px; }
|
||||||
|
.back-btn { background: transparent; color: #007AFF; margin-top: 1rem; font-size: 16px; }
|
||||||
|
.back-btn:hover { background: #f0f8ff; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<img src="/logo.png" alt="Logo" class="logo">
|
||||||
|
|
||||||
|
<div id="input-section">
|
||||||
|
<h1>Email Setup</h1>
|
||||||
|
<p>Enter your email address to automatically configure your iPhone or iPad.</p>
|
||||||
|
|
||||||
|
<div id="error-msg" class="error">Please enter a valid email address.</div>
|
||||||
|
|
||||||
|
<input type="email" id="email" placeholder="name@company.com" required autocomplete="email">
|
||||||
|
<button onclick="generateQR()">Generate QR Code</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="qr-section">
|
||||||
|
<h1>Scan me!</h1>
|
||||||
|
<p>Open the <strong>Camera app</strong> on your iPhone and point it at this code.</p>
|
||||||
|
|
||||||
|
<div id="qrcode"></div>
|
||||||
|
|
||||||
|
<p class="hint">
|
||||||
|
Tap the banner that appears at the top.<br>
|
||||||
|
Click <strong>"Allow"</strong> and then go to <strong>Settings</strong> to install the profile.
|
||||||
|
</p>
|
||||||
|
<button class="back-btn" onclick="resetForm()">Back</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const inputSection = document.getElementById('input-section');
|
||||||
|
const qrSection = document.getElementById('qr-section');
|
||||||
|
const emailInput = document.getElementById('email');
|
||||||
|
const errorMsg = document.getElementById('error-msg');
|
||||||
|
let qrcode = null;
|
||||||
|
|
||||||
|
function generateQR() {
|
||||||
|
const email = emailInput.value.trim();
|
||||||
|
|
||||||
|
if (!email || !email.includes('@') || email.split('@')[1].length < 3) {
|
||||||
|
errorMsg.style.display = 'block';
|
||||||
|
emailInput.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
errorMsg.style.display = 'none';
|
||||||
|
|
||||||
|
const domain = email.split('@')[1];
|
||||||
|
// The magic link
|
||||||
|
const targetUrl = `https://autodiscover.${domain}/apple?email=${email}`;
|
||||||
|
|
||||||
|
// Hide input, show QR
|
||||||
|
inputSection.style.display = 'none';
|
||||||
|
qrSection.style.display = 'block';
|
||||||
|
setTimeout(() => qrSection.style.opacity = '1', 50);
|
||||||
|
|
||||||
|
// Generate (or update) QR Code
|
||||||
|
if (qrcode === null) {
|
||||||
|
qrcode = new QRCode(document.getElementById("qrcode"), {
|
||||||
|
text: targetUrl,
|
||||||
|
width: 200,
|
||||||
|
height: 200,
|
||||||
|
colorDark : "#000000",
|
||||||
|
colorLight : "#ffffff",
|
||||||
|
correctLevel : QRCode.CorrectLevel.H
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
qrcode.clear();
|
||||||
|
qrcode.makeCode(targetUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetForm() {
|
||||||
|
qrSection.style.opacity = '0';
|
||||||
|
setTimeout(() => {
|
||||||
|
qrSection.style.display = 'none';
|
||||||
|
inputSection.style.display = 'block';
|
||||||
|
emailInput.value = '';
|
||||||
|
emailInput.focus();
|
||||||
|
}, 300);
|
||||||
|
}
|
||||||
|
|
||||||
|
emailInput.addEventListener("keypress", function(event) {
|
||||||
|
if (event.key === "Enter") generateQR();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
67
caddy/email.mobileconfig.tpl
Normal file
67
caddy/email.mobileconfig.tpl
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>PayloadContent</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>EmailAccountDescription</key>
|
||||||
|
<string>{{.Req.URL.Query.Get "email"}}</string>
|
||||||
|
<key>EmailAccountName</key>
|
||||||
|
<string>{{.Req.URL.Query.Get "email"}}</string>
|
||||||
|
<key>EmailAccountType</key>
|
||||||
|
<string>EmailTypeIMAP</string>
|
||||||
|
<key>EmailAddress</key>
|
||||||
|
<string>{{.Req.URL.Query.Get "email"}}</string>
|
||||||
|
<key>IncomingMailServerAuthentication</key>
|
||||||
|
<string>EmailAuthPassword</string>
|
||||||
|
<key>IncomingMailServerHostName</key>
|
||||||
|
<string>mail.email-srvr.com</string>
|
||||||
|
<key>IncomingMailServerPortNumber</key>
|
||||||
|
<integer>993</integer>
|
||||||
|
<key>IncomingMailServerUseSSL</key>
|
||||||
|
<true/>
|
||||||
|
<key>IncomingMailServerUsername</key>
|
||||||
|
<string>{{.Req.URL.Query.Get "email"}}</string>
|
||||||
|
<key>OutgoingMailServerAuthentication</key>
|
||||||
|
<string>EmailAuthPassword</string>
|
||||||
|
<key>OutgoingMailServerHostName</key>
|
||||||
|
<string>mail.email-srvr.com</string>
|
||||||
|
<key>OutgoingMailServerPortNumber</key>
|
||||||
|
<integer>465</integer>
|
||||||
|
<key>OutgoingMailServerUseSSL</key>
|
||||||
|
<true/>
|
||||||
|
<key>OutgoingMailServerUsername</key>
|
||||||
|
<string>{{.Req.URL.Query.Get "email"}}</string>
|
||||||
|
<key>PayloadDescription</key>
|
||||||
|
<string>E-Mail Konfiguration für {{.Req.URL.Query.Get "email"}}</string>
|
||||||
|
<key>PayloadDisplayName</key>
|
||||||
|
<string>{{.Req.URL.Query.Get "email"}}</string>
|
||||||
|
<key>PayloadIdentifier</key>
|
||||||
|
<string>com.email-srvr.profile.{{.Req.URL.Query.Get "email"}}</string>
|
||||||
|
<key>PayloadType</key>
|
||||||
|
<string>com.apple.mail.managed</string>
|
||||||
|
<key>PayloadUUID</key>
|
||||||
|
<string>{{uuidv4}}</string>
|
||||||
|
<key>PayloadVersion</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>PayloadDescription</key>
|
||||||
|
<string>Automatische E-Mail Einrichtung für {{.Req.URL.Query.Get "email"}}</string>
|
||||||
|
<key>PayloadDisplayName</key>
|
||||||
|
<string>E-Mail Einstellungen</string>
|
||||||
|
<key>PayloadIdentifier</key>
|
||||||
|
<string>com.email-srvr.profile.root</string>
|
||||||
|
<key>PayloadOrganization</key>
|
||||||
|
<string>IT Support</string>
|
||||||
|
<key>PayloadRemovalDisallowed</key>
|
||||||
|
<false/>
|
||||||
|
<key>PayloadType</key>
|
||||||
|
<string>Configuration</string>
|
||||||
|
<key>PayloadUUID</key>
|
||||||
|
<string>{{uuidv4}}</string>
|
||||||
|
<key>PayloadVersion</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
97
caddy/email_autodiscover
Normal file
97
caddy/email_autodiscover
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
(email_settings) {
|
||||||
|
# 1. Autodiscover für Outlook
|
||||||
|
route /autodiscover/autodiscover.xml {
|
||||||
|
header Content-Type "application/xml"
|
||||||
|
# Wir nutzen {header.X-Anchormailbox} um die Email dynamisch einzufügen
|
||||||
|
respond `<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
|
||||||
|
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
|
||||||
|
<Account>
|
||||||
|
<AccountType>email</AccountType>
|
||||||
|
<Action>settings</Action>
|
||||||
|
<Protocol>
|
||||||
|
<Type>IMAP</Type>
|
||||||
|
<Server>mail.email-srvr.com</Server>
|
||||||
|
<Port>993</Port>
|
||||||
|
<DomainRequired>on</DomainRequired>
|
||||||
|
<LoginName>{header.X-Anchormailbox}</LoginName>
|
||||||
|
<SPA>off</SPA>
|
||||||
|
<SSL>on</SSL>
|
||||||
|
<AuthRequired>on</AuthRequired>
|
||||||
|
</Protocol>
|
||||||
|
<Protocol>
|
||||||
|
<Type>POP3</Type>
|
||||||
|
<Server>mail.email-srvr.com</Server>
|
||||||
|
<Port>995</Port>
|
||||||
|
<DomainRequired>on</DomainRequired>
|
||||||
|
<LoginName>{header.X-Anchormailbox}</LoginName>
|
||||||
|
<SPA>off</SPA>
|
||||||
|
<SSL>on</SSL>
|
||||||
|
<AuthRequired>on</AuthRequired>
|
||||||
|
</Protocol>
|
||||||
|
<Protocol>
|
||||||
|
<Type>SMTP</Type>
|
||||||
|
<Server>mail.email-srvr.com</Server>
|
||||||
|
<Port>465</Port>
|
||||||
|
<DomainRequired>on</DomainRequired>
|
||||||
|
<LoginName>{header.X-Anchormailbox}</LoginName>
|
||||||
|
<SPA>off</SPA>
|
||||||
|
<SSL>on</SSL>
|
||||||
|
<AuthRequired>on</AuthRequired>
|
||||||
|
</Protocol>
|
||||||
|
</Account>
|
||||||
|
</Response>
|
||||||
|
</Autodiscover>` 200
|
||||||
|
}
|
||||||
|
|
||||||
|
# 2. JSON Autodiscover (Modern Outlook) - bleibt gleich
|
||||||
|
route /autodiscover/autodiscover.json {
|
||||||
|
header Content-Type "application/json"
|
||||||
|
respond `{
|
||||||
|
"Protocol": "AutodiscoverV1",
|
||||||
|
"Url": "https://autodiscover.bayarea-cc.com/autodiscover/autodiscover.xml"
|
||||||
|
}` 200
|
||||||
|
}
|
||||||
|
|
||||||
|
# 3. Thunderbird Autoconfig - bleibt gleich (dort funktioniert %EMAILADDRESS% ja nativ)
|
||||||
|
route /mail/config-v1.1.xml {
|
||||||
|
header Content-Type "application/xml"
|
||||||
|
respond `<?xml version="1.0"?>
|
||||||
|
<clientConfig version="1.1">
|
||||||
|
<emailProvider id="email-srvr.com">
|
||||||
|
<displayName>Rackspace Email</displayName>
|
||||||
|
<incomingServer type="imap">
|
||||||
|
<hostname>mail.email-srvr.com</hostname>
|
||||||
|
<port>993</port>
|
||||||
|
<socketType>SSL</socketType>
|
||||||
|
<authentication>password-cleartext</authentication>
|
||||||
|
<username>%EMAILADDRESS%</username>
|
||||||
|
</incomingServer>
|
||||||
|
<outgoingServer type="smtp">
|
||||||
|
<hostname>mail.email-srvr.com</hostname>
|
||||||
|
<port>465</port>
|
||||||
|
<socketType>SSL</socketType>
|
||||||
|
<authentication>password-cleartext</authentication>
|
||||||
|
<username>%EMAILADDRESS%</username>
|
||||||
|
</outgoingServer>
|
||||||
|
</emailProvider>
|
||||||
|
</clientConfig>` 200
|
||||||
|
}
|
||||||
|
|
||||||
|
# NEU: Apple MobileConfig Route
|
||||||
|
# Aufrufbar über: /apple?email=kunde@domain.de
|
||||||
|
route /apple {
|
||||||
|
# KORREKTUR: Wir müssen Caddy sagen, dass er diesen MIME-Type bearbeiten soll!
|
||||||
|
templates {
|
||||||
|
mime "application/x-apple-aspen-config"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Den richtigen MIME-Type setzen
|
||||||
|
header Content-Type "application/x-apple-aspen-config; charset=utf-8"
|
||||||
|
|
||||||
|
# Pfad zur Datei im Container
|
||||||
|
root * /etc/caddy
|
||||||
|
rewrite * /email.mobileconfig.tpl
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,7 +20,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- gitea-data:/data
|
- gitea-data:/data
|
||||||
#- ./gitea/gitea-ssh:/data/git/.ssh
|
#- ./gitea/gitea-ssh:/data/git/.ssh
|
||||||
- /home/git/.ssh/:/data/git/.ssh
|
#- /home/git/.ssh/:/data/git/.ssh
|
||||||
ports:
|
ports:
|
||||||
- "3500:3500"
|
- "3500:3500"
|
||||||
- "2222:22"
|
- "2222:22"
|
||||||
|
|||||||
Reference in New Issue
Block a user