Skip to content

Instantly share code, notes, and snippets.

@PaulGoldschmidt
Created February 1, 2024 19:47
Show Gist options
  • Save PaulGoldschmidt/0fa124afb112c0c8488e577673956809 to your computer and use it in GitHub Desktop.
Save PaulGoldschmidt/0fa124afb112c0c8488e577673956809 to your computer and use it in GitHub Desktop.
Minimal dual reverse proxy setup with Caddy Servers
{
auto_https off
}
:80 {
root * /site
file_server
}
{
auto_https off
}
:80 {
root * /site
file_server
}
http://SLD1.TLD {
reverse_proxy caddy-beta2:80
}
http://SLD2.TLD {
reverse_proxy caddy-beta3:80
}
version: '3.7'
services:
caddy-ingress:
image: caddy:2-alpine
volumes:
- ./Caddyfile-ingress:/etc/caddy/Caddyfile
ports:
- "8001:80"
networks:
- caddy-network
caddy-beta2:
image: caddy:2-alpine
volumes:
- ./Caddyfile-beta2:/etc/caddy/Caddyfile
- ./site-beta2:/site
networks:
- caddy-network
caddy-beta3:
image: caddy:2-alpine
volumes:
- ./Caddyfile-beta3:/etc/caddy/Caddyfile
- ./site-beta3:/site
networks:
- caddy-network
networks:
caddy-network:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment