Skip to content

Commit 7e91379

Browse files
authored
Merge branch 'main' into copilot/add-apple-signin-response-mode
2 parents 301da3c + d39d85b commit 7e91379

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

app/cmd/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func RunServer() int {
5050
startJobs(ctx)
5151

5252
e := routes(web.New())
53-
go e.Start(":" + env.Config.Port)
53+
go e.Start(env.Config.Host + ":" + env.Config.Port)
5454
return listenSignals(e)
5555
}
5656

app/pkg/env/env.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ type config struct {
4848
IdleTimeout time.Duration `env:"HTTP_IDLE_TIMEOUT,default=120s,strict"`
4949
}
5050
Port string `env:"PORT,default=3000"`
51+
Host string `env:"HOST,default="`
5152
HostMode string `env:"HOST_MODE,default=single"`
5253
HostDomain string `env:"HOST_DOMAIN"`
5354
BaseURL string `env:"BASE_URL"`
@@ -66,6 +67,7 @@ type config struct {
6667
Metrics struct {
6768
Enabled bool `env:"METRICS_ENABLED,default=false"`
6869
Port string `env:"METRICS_PORT,default=4000"`
70+
Host string `env:"METRICS_HOST,default="`
6971
}
7072
Database struct {
7173
URL string `env:"DATABASE_URL,required"`

app/pkg/web/engine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (e *Engine) Start(address string) {
128128
}
129129

130130
if env.Config.Metrics.Enabled {
131-
metricsAddress := ":" + env.Config.Metrics.Port
131+
metricsAddress := env.Config.Metrics.Host + ":" + env.Config.Metrics.Port
132132
e.metricsServer = newMetricsServer(metricsAddress)
133133
go func() {
134134
err := e.metricsServer.ListenAndServe()

0 commit comments

Comments
 (0)