mirror of
https://github.com/stoatchat/self-hosted.git
synced 2026-03-20 01:35:16 -05:00
feat: Add a domain alias for caddy (#261)
* feat: Save stoat domain in a .env file and alias Caddy to it internally This commit was made without the use of generative AI. Signed-off-by: Jacob Schlecht <dadadah@echoha.us> * fix: This doesn't work on reverse proxied setups thanks to @agentflemme for help testing This commit was made without the use of generative AI. Signed-off-by: Jacob Schlecht <dadadah@echoha.us> --------- Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
This commit is contained in:
@@ -70,6 +70,10 @@ services:
|
|||||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||||
- ./data/caddy-data:/data
|
- ./data/caddy-data:/data
|
||||||
- ./data/caddy-config:/config
|
- ./data/caddy-config:/config
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
aliases:
|
||||||
|
- "${STOAT_DOMAIN:-caddy}"
|
||||||
|
|
||||||
# API server
|
# API server
|
||||||
api:
|
api:
|
||||||
|
|||||||
@@ -86,8 +86,10 @@ if [ "$REPLY" = "y" ] || [ "$REPLY" = "Y" ]; then
|
|||||||
echo " ports: !override" >> compose.override.yml
|
echo " ports: !override" >> compose.override.yml
|
||||||
echo " - \"8880:80\"" >> compose.override.yml
|
echo " - \"8880:80\"" >> compose.override.yml
|
||||||
echo "caddy is configured to host on :8880. If you need a different port, modify the compose.override.yml."
|
echo "caddy is configured to host on :8880. If you need a different port, modify the compose.override.yml."
|
||||||
|
echo "STOAT_DOMAIN=" > .env
|
||||||
else
|
else
|
||||||
echo "No received. Configuring with built in caddy as primary reverse proxy."
|
echo "No received. Configuring with built in caddy as primary reverse proxy."
|
||||||
|
echo "STOAT_DOMAIN=$DOMAIN" > .env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate secrets
|
# Generate secrets
|
||||||
|
|||||||
Reference in New Issue
Block a user