Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.6.0 postgres: missing known db name #20

Open
etj opened this issue Apr 4, 2019 · 0 comments
Open

3.6.0 postgres: missing known db name #20

etj opened this issue Apr 4, 2019 · 0 comments

Comments

@etj
Copy link
Member

etj commented Apr 4, 2019

The current docker-entrypoint.sh file checks the existence of the GeoNetwork DB by a select in pg_database with the line:

if psql -h "$db_host" -U "$POSTGRES_DB_USERNAME" -p "$db_port" -tqc "SELECT 1 FROM pg_database WHERE datname = '$db_name'" | grep -q 1; then

Anyway pgsql will try and connect to a DB with the same name of the user if a db is not specified.
In the case no DB exists with such a name, the script will misbehave.
We could use the default postgres DB for the test connection.

etj added a commit to etj/docker-geonetwork that referenced this issue Apr 4, 2019
@etj etj changed the title 3.6.0 postgres: missing db name 3.6.0 postgres: missing known db name Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant