Skip to content

Commit

Permalink
Merge pull request #2652 from alphagov/pp-13145/set-bind-host-address
Browse files Browse the repository at this point in the history
PP-13145: Accept BIND_HOST env var and default to localhost
  • Loading branch information
jfharden authored Sep 9, 2024
2 parents 54a9dec + b9676b4 commit 9aa2bbe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
{
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
},
{
"path": "detect_secrets.filters.common.is_baseline_file",
"filename": ".secrets.baseline"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
Expand Down Expand Up @@ -458,9 +462,9 @@
"filename": "src/test/resources/config/test-it-config.yaml",
"hashed_secret": "08cd923367890009657eab812753379bdb321eeb",
"is_verified": false,
"line_number": 27
"line_number": 29
}
]
},
"generated_at": "2024-07-22T11:44:53Z"
"generated_at": "2024-09-06T15:07:58Z"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The [API Specification](/openapi/adminusers_spec.yaml) provides more detail on t
| NAME | DESCRIPTION |
| ----------------------- | ------------------------------------------------------------------------------ |
| `ADMIN_PORT` | The port number to listen for Dropwizard admin requests on. Defaults to `8081`. |
| `BIND_HOST` | The IP address for the application to bind to. Defaults to `127.0.0.1` |
| `BASE_URL` | This is the publicly visible URL for the pay admin users root. Defaults to `http://localhost:8080`. |
| `DB_HOST` | The hostname of the database server. |
| `DB_NAME` | The name of the database on `DB_HOST`. Defaults to `adminusers`. |
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
server:
applicationConnectors:
- type: http
bindHost: ${BIND_HOST:-127.0.0.1}
port: ${PORT:-8080}
adminConnectors:
- type: http
bindHost: ${BIND_HOST:-127.0.0.1}
port: ${ADMIN_PORT:-8081}
requestLog:
appenders:
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/config/test-it-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
server:
applicationConnectors:
- type: http
bindHost: ${BIND_HOST:-127.0.0.1}
port: 0
adminConnectors:
- type: http
bindHost: ${BIND_HOST:-127.0.0.1}
port: 0
requestLog:
appenders: []
Expand Down

0 comments on commit 9aa2bbe

Please sign in to comment.