Closed bt90 closed 2 years ago
Thanks @bt90, Nginx and certbot are what we use for the quick start guide, but isn't actually an official part of the project, just an opinionated way to get started. If you're willing to write up some documentation for the project, we'd gladly add it to the official docs. It should be pretty simple to run any arbitrary reverse proxy in front of Netmaker.
I'm thinking of trying netmaker with Caddy soon. I can give some examples here if I manage to get it working although I'm not sure I'll have time to write up complete docs.
The following snippet should be enough:
{
# LetsEncrypt account
email you@your-domain.com
}
# Dashboard
https://dashboard.NETMAKER_BASE_DOMAIN {
reverse_proxy http://127.0.0.1:8082
}
# API
https://api.NETMAKER_BASE_DOMAIN {
reverse_proxy http://127.0.0.1:8081
}
# gRPC
https://grpc.NETMAKER_BASE_DOMAIN {
reverse_proxy h2c://127.0.0.1:50051
}
The cool thing is that you can add caddy to your docker-compose definition with a static Caddyfile which get's filled using environment variables:
{
# LetsEncrypt account
email {$LE_MAIL}
}
# Dashboard
https://dashboard.{$BASE_DOMAIN} {
reverse_proxy http://127.0.0.1:8082
}
# API
https://api.{$BASE_DOMAIN} {
reverse_proxy http://127.0.0.1:8081
}
# gRPC
https://grpc.{$BASE_DOMAIN} {
reverse_proxy h2c://127.0.0.1:50051
}
@bt90 @0x1a8510f2 Closed. Caddy is now the recommended way of doing a quick install of Netmaker! Thanks for the suggestion, I'm sure this will make installs easier for a lot of people.
Caddy is easier to configure, handles certificate renewal on its own and also supports gRPC using the
h2c
directive which uses cleartext http2 communication to the backend.https://github.com/caddyserver/caddy/
https://hub.docker.com/_/caddy