does anyone have experience using postgres for the...
# general
n
does anyone have experience using postgres for the db back end in unit tests when run using pants? right now we are using in-memory sqlite and would like to transition to using postgres. postgres does not like to run as root. in the container where we run pants, pants likes to run as root. if it does not, then this fails
./pants generate-lockfiles
note that we are running a very old version of pants (2.15.0) and cannot upgrade quite yet. so pants wants to be root, and postgres does not. postgres is launched by pants so it won't start if pants is root, and pants fails in the generate-lockfiles verb if it's not root.
maybe we are just running pants the wrong way to begin with. meaning, as root
f
maybe we are just running pants the wrong way to begin with. meaning, as root
Possibly. I would ask what permission errors are being side-stepped by running Pants as
root
.
Because you should most certainly be able to run Pants as non-
root
.
n
I think it's because we run pants inside a docker container, and by default you are root in the container. I don't mean we launch the container as root. but once inside, you are root unless the container is built with a USER at the top of the dockerfile. we can try that.
f
Right, my point is just to determine the particular operations failing and fix those permission issues. Changing the container user sounds good.
👍 1