Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Fix postgres-db initialization requires a password to start now #219

Merged
merged 5 commits into from
Feb 20, 2020
Merged

Fix postgres-db initialization requires a password to start now #219

merged 5 commits into from
Feb 20, 2020

Conversation

hutchic
Copy link
Member

@hutchic hutchic commented Feb 14, 2020

docker-library/postgres#658

Before

docker-compose -f docker-compose-nexus.yml ps
      Name                     Command               State                                                           Ports
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
edgex-core-consul   docker-entrypoint.sh agent ...   Up       8300/tcp, 8301/tcp, 8301/udp, 8302/tcp, 8302/udp, 0.0.0.0:8400->8400/tcp, 0.0.0.0:8500->8500/tcp, 8600/tcp, 8600/udp
edgex-files         /bin/sh -c /usr/bin/tail - ...   Up
kong                /docker-entrypoint.sh /bin ...   Up       0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp, 0.0.0.0:8443->8443/tcp, 0.0.0.0:8444->8444/tcp
kong-db             docker-entrypoint.sh postgres    Exit 1
kong-migrations     /docker-entrypoint.sh /bin ...   Up       8000/tcp, 8001/tcp, 8443/tcp, 8444/tcp
(failed reverse-i-search)`kong-db': cd ../^Cng-build-tools/
ubuntu@34:~/projects/edgex/developer-scripts/releases/nightly-build/compose-files$
ubuntu@34:~/projects/edgex/developer-scripts/releases/nightly-build/compose-files$
ubuntu@34:~/projects/edgex/developer-scripts/releases/nightly-build/compose-files$ docker-compose -f docker-compose-nexus.yml logs kong-db
Attaching to kong-db
kong-db                   | Error: Database is uninitialized and superuser password is not specified.
kong-db                   |        You must specify POSTGRES_PASSWORD for the superuser. Use
kong-db                   |        "-e POSTGRES_PASSWORD=password" to set it in "docker run".
kong-db                   |
kong-db                   |        You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections
kong-db                   |        without a password. This is *not* recommended. See PostgreSQL
kong-db                   |        documentation about "trust":
kong-db                   |        https://www.postgresql.org/docs/current/auth-trust.html
kong-db                   | Error: Database is uninitialized and superuser password is not specified.
kong-db                   |        You must specify POSTGRES_PASSWORD for the superuser. Use
kong-db                   |        "-e POSTGRES_PASSWORD=password" to set it in "docker run".
kong-db                   |
kong-db                   |        You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections
kong-db                   |        without a password. This is *not* recommended. See PostgreSQL
kong-db                   |        documentation about "trust":
kong-db                   |        https://www.postgresql.org/docs/current/auth-trust.html

After

docker-compose -f docker-compose-nexus.yml ps
      Name                     Command               State                                                           Ports
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
edgex-core-consul   docker-entrypoint.sh agent ...   Up       8300/tcp, 8301/tcp, 8301/udp, 8302/tcp, 8302/udp, 0.0.0.0:8400->8400/tcp, 0.0.0.0:8500->8500/tcp, 8600/tcp, 8600/udp
edgex-files         /bin/sh -c /usr/bin/tail - ...   Up
kong                /docker-entrypoint.sh /bin ...   Up       0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp, 0.0.0.0:8443->8443/tcp, 0.0.0.0:8444->8444/tcp
kong-db             docker-entrypoint.sh postgres    Up       0.0.0.0:5432->5432/tcp
kong-migrations     /docker-entrypoint.sh /bin ...   Exit 0

Fixes edgexfoundry/blackbox-testing#389

@hutchic hutchic changed the title [WIP] Fix postgres-db initialization requires a password to start now Fix postgres-db initialization requires a password to start now Feb 14, 2020
Signed-off-by: Colin Hutchinson <chutchic@gmail.com>
@bnevis-i bnevis-i added geneva security_audit Track issues that are related to CVE/CVSS/CWE auditing etc labels Feb 19, 2020
@tingyuz tingyuz self-assigned this Feb 20, 2020
Copy link
Contributor

@tingyuz tingyuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@tingyuz tingyuz merged commit 3cf862b into edgexfoundry:master Feb 20, 2020
@hutchic hutchic deleted the fix/kong-db-password branch February 21, 2020 00:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
geneva security_audit Track issues that are related to CVE/CVSS/CWE auditing etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Security jenkins jobs failed on importing data by core-data
3 participants