geonetwork / geonetwork/docker-geonetwork
3.6.0 postgres: missing known db name
Open
- Dominant language
- Shell
- Stars
- 40
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.