reorter server start code & make http port configurable

This commit is contained in:
6543 2023-02-13 20:12:13 +01:00
parent 46316f9e2f
commit f06d615d43
No known key found for this signature in database
GPG key ID: B8BE6D610E61C862
6 changed files with 77 additions and 68 deletions

View file

@ -89,13 +89,19 @@ var (
},
&cli.StringFlag{
Name: "port",
Usage: "specifies port of listening address",
EnvVars: []string{"PORT"},
Usage: "specifies the https port to listen to ssl requests",
EnvVars: []string{"PORT", "HTTPS_PORT"},
Value: "443",
},
&cli.StringFlag{
Name: "http-port",
Usage: "specifies the http port, you also have to enable http server via ENABLE_HTTP_SERVER=true",
EnvVars: []string{"HTTP_PORT"},
Value: "80",
},
&cli.BoolFlag{
Name: "enable-http-server",
// TODO: desc
Name: "enable-http-server",
Usage: "start a http server to redirect to https and respond to http acme challenges",
EnvVars: []string{"ENABLE_HTTP_SERVER"},
},
&cli.StringFlag{