how to see the logs?
If you mean the rebuild process logs, then here’s the error message when rebuilding(all red words are here).
2020/07/14 11:33:39 socat[26] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
#------
2020-07-14 11:33:42.023 UTC [49] LOG: database system is ready to accept connections
I, [2020-07-14T11:33:46.972466 #1] INFO -- :
I, [2020-07-14T11:33:46.972792 #1] INFO -- : > su postgres -c 'createdb discourse' || true
2020-07-14 11:33:47.025 UTC [62] postgres@postgres ERROR: database "discourse" already exists
2020-07-14 11:33:47.025 UTC [62] postgres@postgres STATEMENT: CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR: database "discourse" already exists
I, [2020-07-14T11:33:47.026573 #1] INFO -- :
I, [2020-07-14T11:33:47.026936 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2020-07-14 11:33:47.083 UTC [73] postgres@discourse ERROR: role "discourse" already exists
2020-07-14 11:33:47.083 UTC [73] postgres@discourse STATEMENT: create user discourse;
ERROR: role "discourse" already exists