docker-compose does not create necessary roles on postgresql
Running docker compose on wsl2 does not create the necessary roles for the database, causing FATAL error
got this error
Here is the log
Running docker compose on wsl2 does not create the necessary roles for the database, causing FATAL error
me too
you can create init.sql file with the blow content and place it under the following path stack.local\postgres it works with me
DROP DATABASE IF EXISTS ledger; DROP DATABASE IF EXISTS payments;
CREATE USER ledger WITH PASSWORD 'ledger_password';
CREATE DATABASE ledger; CREATE DATABASE payments;
GRANT ALL PRIVILEGES ON DATABASE ledger TO ledger; GRANT ALL PRIVILEGES ON DATABASE payments TO ledger;
CREATE ROLE formance WITH LOGIN PASSWORD 'formance';
GRANT ALL PRIVILEGES ON DATABASE ledger TO formance;
CREATE ROLE formance WITH LOGIN PASSWORD 'formance';
GRANT ALL PRIVILEGES ON DATABASE ledger TO formance;
