Created
February 1, 2024 19:47
-
-
Save PaulGoldschmidt/0fa124afb112c0c8488e577673956809 to your computer and use it in GitHub Desktop.
Minimal dual reverse proxy setup with Caddy Servers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
auto_https off | |
} | |
:80 { | |
root * /site | |
file_server | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
auto_https off | |
} | |
:80 { | |
root * /site | |
file_server | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://SLD1.TLD { | |
reverse_proxy caddy-beta2:80 | |
} | |
http://SLD2.TLD { | |
reverse_proxy caddy-beta3:80 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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