feat: override PG host Docker-advertised address when set (#732)
This commit is contained in:
1 parent
547ae7c802
commit
bfa3edbbac
2 files changed
+9
-4
No files matched your search
+6
-2
@@ -14,12 +14,15 @@ Canonical reference for changes, improvements, and bugfixes for Boundary.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* cli: Fix database init when locale isn't english
|
||||
* cli: Fix database init when locale isn't English
|
||||
([Issue](https://github.com/hashicorp/boundary/issues/729))
|
||||
([PR](https://github.com/hashicorp/boundary/pull/736))
|
||||
* cli: Fix hyphenation in help output for resources with compound names
|
||||
([Issue](https://github.com/hashicorp/boundary/issues/686))
|
||||
([PR](https://github.com/hashicorp/boundary/pull/689))
|
||||
* controller: Allow connecting to Postgres when using remote Docker in dev mode
|
||||
([Issue](https://github.com/hashicorp/boundary/issues/720)
|
||||
([PR](https://github.com/hashicorp/boundary/pull/732))
|
||||
* controller, worker: Fix listening on IPv6 addresses
|
||||
([Issue](https://github.com/hashicorp/boundary/issues/701))
|
||||
([PR](https://github.com/hashicorp/boundary/pull/703))
|
||||
@@ -29,4 +32,5 @@ Canonical reference for changes, improvements, and bugfixes for Boundary.
|
||||
|
||||
## v0.1.0
|
||||
|
||||
v0.1.0 is the first release of Boundary. As a result there are no changes, improvements, or bugfixes from past versions.
|
||||
v0.1.0 is the first release of Boundary. As a result there are no changes,
|
||||
improvements, or bugfixes from past versions.
|
||||
@@ -29,6 +29,9 @@ func startDbInDockerSupported(dialect string) (cleanup func() error, retURL, con
|
||||
case "postgres":
|
||||
resource, err = pool.Run("postgres", "12", []string{"POSTGRES_PASSWORD=password", "POSTGRES_DB=boundary"})
|
||||
url = "postgres://postgres:password@localhost:%s?sslmode=disable"
|
||||
if err == nil {
|
||||
url = fmt.Sprintf("postgres://postgres:password@%s?sslmode=disable", resource.GetHostPort("5432/tcp"))
|
||||
}
|
||||
default:
|
||||
panic(fmt.Sprintf("unknown dialect %q", dialect))
|
||||
}
|
||||
@@ -40,8 +43,6 @@ func startDbInDockerSupported(dialect string) (cleanup func() error, retURL, con
|
||||
return cleanupDockerResource(pool, resource)
|
||||
}
|
||||
|
||||
url = fmt.Sprintf(url, resource.GetPort("5432/tcp"))
|
||||
|
||||
if err := pool.Retry(func() error {
|
||||
db, err := sql.Open(dialect, url)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user