Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Allow `HOST` variable to specify specific host variable to bind to. [PR #157](https://github.com/riverqueue/riverui/pull/157).

## [0.5.3] - 2024-09-05

### Fixed

- Remove `.gitignore` from Go module bundle because it messes with vendoring in some situations. Thanks [Pedro Henrique](https://github.com/crossworth)! 🙏🏻 [PR #149](https://github.com/riverqueue/riverui/pull/149).

## [0.5.2] - 2024-09-02
Expand Down
17 changes: 8 additions & 9 deletions cmd/riverui/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"cmp"
"context"
"errors"
"flag"
Expand Down Expand Up @@ -54,15 +55,13 @@ func initAndServe(ctx context.Context) int {
}
pathPrefix = riverui.NormalizePathPrefix(pathPrefix)

corsOriginString := os.Getenv("CORS_ORIGINS")
corsOrigins := strings.Split(corsOriginString, ",")
dbURL := mustEnv("DATABASE_URL")
otelEnabled := os.Getenv("OTEL_ENABLED") == "true"
host := os.Getenv("HOST")
port := os.Getenv("PORT")
if port == "" {
port = "8080"
}
var (
corsOrigins = strings.Split(os.Getenv("CORS_ORIGINS"), ",")
dbURL = mustEnv("DATABASE_URL")
host = os.Getenv("HOST") // may be left empty to bind to all local interfaces
otelEnabled = os.Getenv("OTEL_ENABLED") == "true"
port = cmp.Or(os.Getenv("PORT"), "8080")
)

dbPool, err := getDBPool(ctx, dbURL)
if err != nil {
Expand Down