Description
The postgresql plugin's process-compose.yaml does not respect the PGPORT environment variable when starting postgres:
# Current (plugins/postgresql/process-compose.yaml)
command: "pg_ctl start -o \"-k '$PGHOST'\""
This means postgres always starts on port 5432, even if PGPORT is set in the environment or via devbox.json.
Use Case
Running multiple devbox projects or worktrees simultaneously requires each instance to use different ports to avoid conflicts. Currently, there's no way to configure the postgres port through devbox's standard mechanisms.
Expected Behavior
The plugin should respect PGPORT like it respects PGHOST:
# Proposed fix
command: "pg_ctl start -o \"-k $PGHOST -p $PGPORT\""
And the readiness probe should also use the port:
readiness_probe:
exec:
command: "pg_isready -p $PGPORT"
Additional Context
- The valkey plugin correctly uses
$VALKEY_PORT in its process-compose.yaml, so this pattern already exists in other plugins
- This is a one-line fix that would enable parallel development workflows
- Current workaround requires bypassing
devbox services entirely and starting postgres manually
Description
The postgresql plugin's
process-compose.yamldoes not respect thePGPORTenvironment variable when starting postgres:This means postgres always starts on port 5432, even if
PGPORTis set in the environment or viadevbox.json.Use Case
Running multiple devbox projects or worktrees simultaneously requires each instance to use different ports to avoid conflicts. Currently, there's no way to configure the postgres port through devbox's standard mechanisms.
Expected Behavior
The plugin should respect
PGPORTlike it respectsPGHOST:And the readiness probe should also use the port:
Additional Context
$VALKEY_PORTin its process-compose.yaml, so this pattern already exists in other pluginsdevbox servicesentirely and starting postgres manually