Createdb: error: database creation failed: ERROR: database "discourse" already exists

thanks for your reply ,jay
i have searched for error line in the whole log , maybe it’s caused by

2023-06-08 01:19:04.972 UTC [55] postgres@template1 ERROR:  database "discourse" already exists
2023-06-08 01:19:04.972 UTC [55] postgres@template1 STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
I, [2023-06-08T01:19:04.977485 #1]  INFO -- : 
I, [2023-06-08T01:19:04.978414 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2023-06-08 01:19:05.654 UTC [59] postgres@discourse ERROR:  role "discourse" already exists
2023-06-08 01:19:05.654 UTC [59] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists

it’s my first installation in the server, but i have rebuild app many times of falure with other errors like My server can access github, but docker can’t - #2 by whitewaterdeu

i don’t know when i have created the database and how to fix it