Skip to content

Commit 1ecfd4a

Browse files
authored
[plugins] Added support for being able to specify PGPORT to postgres plugin (#2774)
## Summary Addresses #2773 ## How was it tested? - prerequisite: add alias to compiled and built devbox binary (dx="path_to_devbox/dist/devbox") - in 2 different directories named pg_test1 and pg_test2 run: - - `dx init` - - `dx add postgresql` - - `dx run -- initdb` - in pg_test2/devbox.json add `"env": { "PGPORT": "5433" }` - - in both directories run `dx services up` - - confirm both process composes run postgress on ports 5432 and 5433 without error ## Community Contribution License All community contributions in this pull request are licensed to the project maintainers under the terms of the [Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0). By creating this pull request, I represent that I have the right to license the contributions to the project maintainers under the Apache 2 License as stated in the [Community Contribution License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).
1 parent 947d4c2 commit 1ecfd4a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/postgresql/process-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ version: "0.5"
22

33
processes:
44
postgresql:
5-
command: "pg_ctl start -o \"-k '$PGHOST'\""
5+
command: "pg_ctl start -o \"-k '$PGHOST' ${PGPORT:+-p '$PGPORT'}\""
66
is_daemon: true
77
shutdown:
88
command: "pg_ctl stop -m fast"
99
availability:
1010
restart: "always"
1111
readiness_probe:
1212
exec:
13-
command: "pg_isready"
13+
command: "pg_isready ${PGPORT:+-p '$PGPORT'}"

0 commit comments

Comments
 (0)