Support www redirects in Docker install
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
# Caddyfile for Synapsis
|
||||
# Automatic HTTPS via Let's Encrypt
|
||||
|
||||
www.{$DOMAIN} {
|
||||
redir https://{$DOMAIN}{uri} permanent
|
||||
}
|
||||
|
||||
{$DOMAIN} {
|
||||
# Reverse proxy to Synapsis app (port is set via APP_PORT env var)
|
||||
reverse_proxy app:{$APP_PORT:3000}
|
||||
|
||||
@@ -41,6 +41,9 @@ Edit `.env` and set these required values (domain should be host only, no scheme
|
||||
| `AUTH_SECRET` | Run: `openssl rand -hex 32` |
|
||||
| `ADMIN_EMAILS` | Your email address |
|
||||
|
||||
Use the bare/canonical host in `DOMAIN`. Example: set `DOMAIN=synapsis.example.com`, not `www.synapsis.example.com`.
|
||||
If you also want `www.synapsis.example.com` to work, create a DNS record for `www` pointing to the same server. The bundled Caddy config will redirect `www` to the canonical `DOMAIN`.
|
||||
|
||||
Optional (advanced):
|
||||
- `NEXT_PUBLIC_NODE_DOMAIN` to override the node domain (defaults to `DOMAIN`)
|
||||
- `NEXT_PUBLIC_APP_URL` to override the public app URL used by background jobs (auto-derived from the node domain)
|
||||
|
||||
Reference in New Issue
Block a user