Harry
05/12/2022, 2:56 PMError: Database is uninitialized and superuser password is not specified.
You must specify POSTGRES_PASSWORD to a non-empty value for the
superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
connections without a password. This is *not* recommended.
See PostgreSQL documentation about "trust":
<https://www.postgresql.org/docs/current/auth-trust.html>
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Harry
05/13/2022, 6:28 AMdocker logs <container id> --details.
on the following container to see what error has it logged !
d88204f1f9d8 postgres "docker-entrypoint.s…" 21 seconds ago Exited (1) 20 seconds ago peaceful_mendel
Harry
05/13/2022, 6:29 AMHarry
05/13/2022, 6:45 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Harry
05/13/2022, 6:47 AMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Harry
05/13/2022, 2:45 PMsudo docker run -d pactfoundation/pact-broker
with the latest pact-broker version 2.98.0
and now encountering this issue
2022-05-13 14:35:52.560039 I [9:4600] pact-broker -- Connecting to database: -- "{:adapter=>\"postgres\", :encoding=>\"utf8\", :sql_log_level=>:debug, :enable_caller_logging=>false, :log_warn_duration=>5.0, :pool_timeout=>5, :driver_options=>{:options=>\"-c statement_timeout=15s\"}, :connect_max_retries=>0, :password=>\"*****\"}"
! Unable to load application: Sequel::DatabaseConnectionError: PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
docker run --rm \
-e PACT_BROKER_DATABASE_URL=<url> \
pactfoundation/pact-broker
Harry
05/13/2022, 3:02 PMHarry
05/13/2022, 3:03 PMYousaf Nabi (pactflow.io)
9292
docker run --rm \ ─╯
-e PACT_BROKER_DATABASE_URL=$PACT_BROKER_DATABASE_URL \
-p 9292:9292 \
pactfoundation/pact-broker
Beth (pactflow.io/Pact Broker/pact-ruby)