hcengineering / hcengineering/huly-selfhost
How to install with Caddy?
- Dominant language
- Shell
- Stars
- 3.5k
- Forks
- 469
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
First of all, I'd like to say thanks for your app, it's truly the best I've seen lately🚀.
I saw that you have installation scripts using `nginx` and `traeffik`, but I already have [Caddy ](https://caddyserver.com/) installed and configured, so I would like to use it further.
I tried to install your app and configure the reverse proxy in the same way as all other applications that are running on my server, i.e I receive an external port from the app's container and set up something like this:
```
example.com {
reverse_proxy localhost:8087
}
```
I ran the application but on client got an error: Unknown Error: Failed to Fetch, in the developer console there was
GET ``http://localhost:3000/providers`` net::ERR_CONNECTION_REFUSED
I found a [comment](https://github.com/hcengineering/huly-selfhost/issues/57#issuecomment-2409016925), that says that you need to set the environment variables correctly.
I tried to adapt the nginx configuration [files](https://github.com/hcengineering/huly-selfhost/tree/main/nginx) for caddy using its [directives](https://caddyserver.com/docs/caddyfile/directives#caddyfile-directives) like `rewrite`, `handle_path` and `header`, tried set variables,
but unfortunately I was never able to configure the application,
### THEREFORE
if anyone was able to set up this with reverse proxy Caddy on a host please show how to do it ✍️👀
Commands for reproduce
> presettings: install docker, check A-record from domain DNS
```
# install Huly
$ git clone https://github.com/hcengineering/huly-selfhost.git
$ cd huly-selfhost
$ ./setup.sh localhost
$ docker-compose up -d
# install and setup Caddy
$ apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
$ curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
$ curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
$ apt update
$ apt install caddy
$ read -p "domain: " domain && echo -e "$domain {\n\treverse_proxy localhost:8087\n}" | tee /etc/caddy/Caddyfile
$ systemctl restart caddy
open $domain and check DevTools
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.