feat: add docker configuration

This commit is contained in:
sam 2024-09-14 18:07:49 +02:00
parent 821712f43b
commit cf2f624ae4
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
21 changed files with 232 additions and 13 deletions

View file

@ -23,6 +23,14 @@ func main() {
log.Fatalf("unmarshaling config.json: %v", err)
}
// Override port from environment if it's set
if portEnv := os.Getenv("PORT"); portEnv != "" {
port, err := strconv.Atoi(portEnv)
if err == nil {
hn.Port = port
}
}
proxyURL, err := url.Parse(hn.ProxyTarget)
if err != nil {
log.Fatalf("parsing proxy_target as URL: %v", err)