In this guide you will learn how to use Caddy web server to automatically generate an SSL certificate and run ImagineAPI using a domain/subdomain instead of an IP.
- Make sure you point a domain to the IP where ImagineAPI is hosted.
git clone [email protected]:imagineapi/ssl.git
cd ssl
- Add your email and domain to
Caddyfile
. For example I want my domain to bedemo.imagineapi.dev
and my Caddyfile looks like this:
{
email [email protected]
}
demo.imagineapi.dev {
reverse_proxy api:8055
}
- Launch the Caddy server with
docker compose up -d