I cannot get gvmd to connect to a remote postgres database. My yml works 100% until I try to do the remote postgres. Why remote, I want to use that server for multiple purposes…here is my gvmd section…seriously…help…
no indicator / evidence was found that these environmental variables are even supported. Looking further into the gvmd repository one can find the PR #1308 including:
This is currently only fully usable for local setups using UNIX domain sockets as authentication options for TCP/IP connections are still missing.
so it doesn’t look like such a remote connection is “natively” possible / supported.
So then alternate question…can I refer to an existing postgres container. Thereby it is not a remote postgres server. This allows me to uncouple the installation of postgres from the installation of greenbone.
Here is my suggestion, but you will have to conduct the efforts to verify the process. I suggest downloading the gvmd repository and adjusting the docker-compose.yml file to build the gvmd container from the local repository instead of the remote one hosted by Greenbone on DockerHub. You can find some posts describing how to do this already on the forum.
Then, you can see in the the prod.Dockerfile that gvmd installs postgresql-client-13 and postgresql-client-common. From here I would modify the start-gvm.sh, which is called at the end of the prod.Dockerfile. You should configure the gvmd container’s PosgreSQL client to connect to a remote instance rather than using the psql_socket_vol and psql_data_vol volumes which are mounted to gvmd container when it starts.