Configuración externa de postgres no funciona

Hemos seguido el siguiente blog para configurar Discourse para usar un PostgreSQL separado (AWS RDS).

Estamos recibiendo el siguiente error (imagen adjunta) después de ejecutar ./launcher rebuild app:

Caused by:
PG::InvalidSchemaName: ERROR:  no schema has been selected to create in
LINE 1: CREATE TABLE \"schema_migrations\" (\"version\" character varyin...
                     ^
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.0.0/lib/patches/db/pg.rb:110:in `exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.0.0/lib/patches/db/pg.rb:110:in `async_exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/connection_adapters/abstract_adapter.rb:765:in `block in log'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/connection_adapters/abstract_adapter.rb:756:in `log'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:325:in `create_table'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/schema_migration.rb:23:in `create_table'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/migration.rb:1259:in `initialize'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/migration.rb:1117:in `new'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/migration.rb:1117:in `up'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/migration.rb:1092:in `migrate'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/tasks/database_tasks.rb:262:in `migrate'
/var/www/discourse/lib/tasks/db.rake:246:in `block (2 levels) in <main>'
/var/www/discourse/lib/distributed_mutex.rb:53:in `block in synchroniz

Sin mirar demasiado de cerca, creo que eso podría significar que creaste el servidor de base de datos, pero no creaste la base de datos de discourse. ¿O no proporcionaste el nombre de la base de datos en la configuración?

La configuración de la base de datos en app.yml es la siguiente:

env:
DISCOURSE_DB_USERNAME: discourse
DISCOURSE_DB_PASSWORD: “XXX”
DISCOURSE_DB_HOST: xxx.rds.amazonaws.com
DISCOURSE_DB_NAME: discourse

Puedo conectarme a esta base de datos usando pgAdmin. He ejecutado los siguientes comandos en esta base de datos para discourse:

CREATE USER discourse PASSWORD ‘XXX’;
CREATE DATABASE discourse OWNER discourse;

CREATE EXTENSION hstore;
CREATE EXTENSION pg_trgm;

Por favor, ayúdenme con este problema.

Hola @deepak_b :slight_smile:

Marcaste esta publicación como la solución. ¿Resolviste tu problema? Si es así, ¿puedes compartir cómo lo hiciste? De esta manera podría ayudar a otras personas en el futuro.