Closed giftig closed 5 years ago
DB_PORT_5432_TCP_ADDR and DB_PORT_5432_TCP_PORT are necessary when running with postgres. Depends on the way you start your containers, these environment variables will be generated when you use the docker --link
way as described in the README. Otherwise, you have to set it by yourself.
Ah I see, they're docker env variables referring to the image DB
when they're linked via the legacy method. I was initially curious how the correct container was discovered by gerrit, given that the example showed no configuration passed to the gerrit image.
In that case, the issue is really that the Dockerfile is geared specifically towards using the legacy link feature of docker rather than networks, and doesn't provide any real means of configuring the postgres target properly.
Updated the title accordingly.
Looks like it's a duplicate of #64.
I'll close and create my own image instead. Thanks.
Although docker —link compatable has to be supported until docker and kubernetes stop supporting this feature, it’s time to move on to a more descriptive name while keeping the old one supported.
Hi @giftig I add another way to connect with external database. It has been included in the latest image and will be released when Gerrit release another version. Let me know if it works for you, please.
This appears repeatedly in the log when I run gerrit with postgres, while postgres is still initialising:
This is presumably related to this line:
I don't see the line prior to that statement being echoed, but I'm guessing that's simply being swallowed elsewhere as I'm observing this while postgres is still initialising, which is what that line is waiting for.
I don't have time to build my own image with some debugging to find out what's caused the error right now, but if I get chance later I'll see if I can debug it further. The obvious answer is that either
$DB_PORT_5432_TCP_ADDR
or${DB_PORT_5432_TCP_PORT}
is unset in the script, though since it eventually stops polling, it still seems to be noticing that postgres is up somehow.