fix caddy for public sites

caddy is now fully functional only nitpick is that 444 is always required
and docker build for the porkbun support
This commit is contained in:
Mika Bomm 2024-07-23 23:27:25 +02:00
parent f909f0f8e8
commit b40fe970b7
3 changed files with 24 additions and 16 deletions

View file

@ -1,14 +1,14 @@
# GLOBAL CONFIGURATIONS
{
#http_port 81
#https_port 444
http_port 81
https_port 444
# readd later already rate limited :(
email mika.bomm@outlook.com
acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
#acme_dns porkbun {
# api_key {$PORKBUN_API_KEY} # dont hardcode this please
# api_secret_key {$PORKBUN_API_SECRET_KEY} #dont hardcode this please
#}
#acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
acme_dns porkbun {
api_key {$PORKBUN_API_KEY} # dont hardcode this please
api_secret_key {$PORKBUN_API_SECRET_KEY} #dont hardcode this please
}
# auto_https off
# Done for debugging
@ -22,11 +22,11 @@
}
}
#pdf2.mixel.cloud {
# reverse_proxy 192.168.178.230:55556
#}
pdf2.mixel.cloud {
reverse_proxy 192.168.178.230:55556
}
mini1.docker.local {
https://mini1.docker.local {
import logging
reverse_proxy http://192.168.178.230:55556
}

9
caddy/Dockerfile Normal file
View file

@ -0,0 +1,9 @@
# Dockerfile
FROM caddy:builder AS builder
RUN xcaddy build \
--with github.com/caddy-dns/porkbun
FROM caddy:2.8.4-alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy

View file

@ -1,12 +1,13 @@
services:
caddy:
image: caddy:2.8.4-alpine
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
container_name: caddy
ports:
- "80:80"
- "443:443"
- "81:81"
- "444:444"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./site:/srv
@ -21,9 +22,7 @@ services:
networks:
caddy:
volumes:
caddy_data:
external: true
caddy_config: