diff --git a/.gitignore b/.gitignore index b5c8bae..967e4db 100644 --- a/.gitignore +++ b/.gitignore @@ -9,12 +9,15 @@ !**/README.md !.gitignore !**/compose.yml -!**/Caddyfile !**/.env.example !**/Dockerfile +#Caddy +!**/Caddyfile +!**/services/*.caddy #DDNS updater !**/data/config.json + diff --git a/caddy/Caddyfile b/caddy/Caddyfile index 0ddc032..3ecb6de 100644 --- a/caddy/Caddyfile +++ b/caddy/Caddyfile @@ -10,8 +10,12 @@ api_secret_key {$PORKBUN_API_SECRET_KEY} } - #Debugging stuff - #acme_ca https://acme-staging-v02.api.letsencrypt.org/directory + # Used for Debugging + # This will request a certificate from staging and not from prod + # Staging has a higher rate limit + # acme_ca https://acme-staging-v02.api.letsencrypt.org/directory + + # This makes every subdomain used for http only # auto_https off } @@ -23,10 +27,8 @@ } } -pdf2.mixel.cloud { - import logging - reverse_proxy 192.168.178.230:55556 -} +# Import service-specific Caddyfiles +import /etc/caddy/services/*.caddy code-server.mini1.docker.local { import logging @@ -48,19 +50,11 @@ ha.mini1.docker.local { reverse_proxy 192.168.178.230:8123 } -https://mini1.docker.local { - reverse_proxy http://192.168.178.230:55556 +mini1.docker.local { + reverse_proxy 192.168.178.230:55556 } -http://192.168.178.230 { - reverse_proxy http://192.168.178.230:55556 -} - -:81 { - respond "Hello, World!" -} - -http://pihole.local { +pihole.local { handle_path /* { rewrite * /admin{path} reverse_proxy 192.168.178.244 diff --git a/caddy/compose.yaml b/caddy/compose.yaml index 27fe10d..aa2d99a 100644 --- a/caddy/compose.yaml +++ b/caddy/compose.yaml @@ -11,9 +11,12 @@ services: volumes: - ./Caddyfile:/etc/caddy/Caddyfile - ./site:/srv + - ./logs:/var/log/caddy + # extra Caddyfiles + - ./services:/etc/caddy/services + # volume data - caddy_data:/data - caddy_config:/config - - ./logs:/var/log/caddy networks: - caddy env_file: diff --git a/caddy/services/stirling-pdf.caddy b/caddy/services/stirling-pdf.caddy new file mode 100644 index 0000000..c7ef2fa --- /dev/null +++ b/caddy/services/stirling-pdf.caddy @@ -0,0 +1,3 @@ +pdf2.mixel.cloud { + reverse_proxy 192.168.178.230:55556 +} \ No newline at end of file