Closed ynifamily3 closed 3 years ago
The error says that notesadmin
user already exists in your postgres db. so i think you should just remove the CREATE ROLE notesadmin WITH LOGIN PASSWORD 'password';
line from scripts/init_db.sh
file and it should start working for you.
Having the same problem, except I don't have the error with existing user. Tried both ports 3000 and 4000 with no difference.
Windows 10 Node v15.4.0
FWIW, removing the network_mode
option from docker-compose.yml
made it work for me, but then the issue is that it can't find Postgres at port 5432.
Does https://github.com/reactjs/server-components-demo/pull/10 work for you all?
Do note that when running docker-compose up & down, postgres container only runs the init script when first starting up, so you need to run docker-compose down -v
to also remove the data volume first if you have faced this issue.
@poteto, #10 did work for me!
Gonna close this since we have a possible fix in #10. Please feel free to reopen if it's still broken.
postgres_1 | /usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/init_db.sh postgres_1 | 2020-12-22 06:31:21.349 UTC [70] ERROR: role "notesadmin" already exists postgres_1 | 2020-12-22 06:31:21.349 UTC [70] STATEMENT: CREATE ROLE notesadmin WITH LOGIN PASSWORD 'password'; postgres_1 | ERROR: role "notesadmin" already exists