Skip to content

Instantly share code, notes, and snippets.

@cdpath
Created July 21, 2024 17:51
Show Gist options
  • Save cdpath/244b1963c93a6d091ffb4ddd107559a9 to your computer and use it in GitHub Desktop.
Save cdpath/244b1963c93a6d091ffb4ddd107559a9 to your computer and use it in GitHub Desktop.
LobeChat + Caddy + HTTPS
{
admin off
http_port 80
https_port 443
}
example.com:443 { # Replace with your domain
tls abc@example.com # Replace with your email for Let's Encrypt notifications
handle {
reverse_proxy lobe-chat:3210
}
}
example.com:80 { # Replace with your domain
redir https://{host}:443{uri} permanent
}
services:
lobe-chat:
image: lobehub/lobe-chat
restart: always
environment:
ACCESS_CODE: 1xae0uSh # Replace with your access code
caddy:
image: caddy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
depends_on:
- lobe-chat
volumes:
caddy_data:
caddy_config:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment