docker run -it -v /data:{FolderToStoreCert} ghcr.io/thecuriousgeek/cert-gen -o /data/{OutputPrefix}-h {HostName} -h {HostName2}...
This would generate the certificate ({OutputPrefix}.crt and .key) in the {FolderToStoreCert} directory
#Assuming the certificate is in /cert/caddy.crt and /cert/caddy.key
https://*.MyDomain {
tls /cert/caddy.crt /cert/caddy.key
@app host app.*
handle @app {
reverse_proxy localhost:80
}
}
#Assume that the cert and key files are in ./mydomain.crt and ./mydomain.key
_Config = uvicorn.Config(App,host='0.0.0.0',port=_Port,log_level='warning',ssl_certfile='mydomain.crt',ssl_keyfile='mydomain.key')
_Server = uvicorn.Server(_Config)
_Server.serve()