devenv: Postgres does not work with process-compose

Describe the bug When trying to start postgres with process-compose it does an invalid readiness check. This means that it will always be marked as not ready by process-compose and be shut down.

https://github.com/cachix/devenv/blob/ae9100ae735baf5b0c491eabf76c6a9ec0a79757/src/modules/services/postgres.nix#L303C24-L303C24

Would it be possible to change the readiness_probe?

To reproduce Please provide an Short, Self Contained, Correct (Compilable), Example by creating a gist using devenv.nix, devenv.yaml, and optionally devenv.lock.

https://gist.github.com/Alexnortung/566e822547189e6d2a5b1a1547caa6b4

Version

devenv: 0.6.3

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

Found:

  process-managers.process-compose.settings.processes = {
    postgres.readiness_probe.exec.command = lib.mkForce "pg_isready -h 127.0.0.1 -p 35431 -d template1";
  };

The root of all the problems seems correlated with this funny error that I get during the DB initialization: Unix-domain socket path ".." is too long (maximum 103 bytes)

I was copying from your repo indeed 😃 Your repo works, now I need to understand what’s different…

Hmm, strange. I’m also on MacOS (M1). Bit of a self-promote here, but could you try cloning this repo? https://github.com/schemamap/schemamap

Then running devenv up. This works for me flawlessly.