Skip to content

Commit ff6826d

Browse files
authored
Add a readiness_probe for postgresql (#2094)
## Summary This PR adds the following `readiness_probe` to the `postgresql` plugin: ```yaml readiness_probe: exec: command: "pg_isready" ``` With that change, Devbox users have the ability to create their own processes that depend on a healthy postgresql service. For example, to seed a database, one can add the following to a `process-compose.yml`: ```yaml version: "0.5" processes: seed_db: command: | npm run db:seed # for example depends_on: postgresql: condition: process_healthy ``` ## How was it tested? In a project with the above `process-compose.yml` file and the changes in this PR applied to `.devbox/virtenv/postgresql/process-compose.yml` Signed-off-by: @mootoday <[email protected]>
1 parent fac4117 commit ff6826d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/postgresql/process-compose.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ processes:
77
shutdown:
88
command: "pg_ctl stop -m fast"
99
availability:
10-
restart: "always"
10+
restart: "always"
11+
readiness_probe:
12+
exec:
13+
command: "pg_isready"

0 commit comments

Comments
 (0)