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 # GLOBAL CONFIGURATIONS
{ {
#http_port 81 http_port 81
#https_port 444 https_port 444
# readd later already rate limited :( # readd later already rate limited :(
email mika.bomm@outlook.com email mika.bomm@outlook.com
acme_ca https://acme-staging-v02.api.letsencrypt.org/directory #acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
#acme_dns porkbun { acme_dns porkbun {
# api_key {$PORKBUN_API_KEY} # dont hardcode this please api_key {$PORKBUN_API_KEY} # dont hardcode this please
# api_secret_key {$PORKBUN_API_SECRET_KEY} #dont hardcode this please api_secret_key {$PORKBUN_API_SECRET_KEY} #dont hardcode this please
#} }
# auto_https off # auto_https off
# Done for debugging # Done for debugging
@ -22,11 +22,11 @@
} }
} }
#pdf2.mixel.cloud { pdf2.mixel.cloud {
# reverse_proxy 192.168.178.230:55556 reverse_proxy 192.168.178.230:55556
#} }
mini1.docker.local { https://mini1.docker.local {
import logging import logging
reverse_proxy http://192.168.178.230:55556 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: services:
caddy: caddy:
image: caddy:2.8.4-alpine build:
context: .
dockerfile: Dockerfile
restart: unless-stopped restart: unless-stopped
container_name: caddy container_name: caddy
ports: ports:
- "80:80"
- "443:443"
- "81:81" - "81:81"
- "444:444"
volumes: volumes:
- ./Caddyfile:/etc/caddy/Caddyfile - ./Caddyfile:/etc/caddy/Caddyfile
- ./site:/srv - ./site:/srv
@ -21,9 +22,7 @@ services:
networks: networks:
caddy: caddy:
volumes: volumes:
caddy_data: caddy_data:
external: true external: true
caddy_config: caddy_config: