Install the docker version with a remote postgresql

Hello,

We are migrating our phpbb3 forum to discourse (yeah!)
So I’m trying to install (configure) a standard discourse (docker version) with a remote postgresql server (centrally provided by IT, for which I don’t have superuser permission)
Is there a simple explanation (or a concrete example) how to do it?
Thanks in advance!

Cheers, Bertrand.

Unfortunately I don’t think it will be possible to install Discourse without super user account in Postgres.

1 Like

Hmm, I dunno… the only thing you should need superuser for is to create the DB and role; from there, the regular user can do everything. So if Central IT (all praise the glorious Leader!) do those bits, and the config in app.yml is setup with the correct creds, surely it’d work OK?

/me gives it a go

OK, that worked well enough (for the most part). I’ll write up a howto topic and link it from here, since there are a few steps to making it work right.

8 Likes

Give this new, shiny howto a go, and post in that topic if you’ve got any problems.

5 Likes

Thank you very much everybody, I will give it a try and let you know.

Cheers, Bertrand.

Hi Matt,

It seems to work! Thank you very much! :grinning:
I’ll post again if something goes wrong with the DB…

Cheers, Bertrand.

Do we have to modify the web.template.yml file?
In particular this part:

env:
  # You can have redis on a different box
  RAILS_ENV: 'production'
  UNICORN_WORKERS: 3
  UNICORN_SIDEKIQS: 1
  # this gives us very good cache coverage, 96 -> 99
  # in practice it is 1-2% perf improvement
  RUBY_GLOBAL_METHOD_CACHE_SIZE: 131072
  # stop heap doubling in size so aggressively, this conserves memory
  RUBY_GC_HEAP_GROWTH_MAX_SLOTS: 40000
  RUBY_GC_HEAP_INIT_SLOTS: 400000
  RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR: 1.5

  DISCOURSE_DB_SOCKET: /var/run/postgresql
  DISCOURSE_DB_HOST:
  DISCOURSE_DB_PORT:

Shouldn’t this also point to our remote postgresql instance?
(same question for any other configuration file…)

Not really , everything in ‘app.yml’ overrides the templates it mixes in

3 Likes

OK, thanks! And BTW, I really love Discourse! :slight_smile:
Thanks to your help, we finally migrated from our phpBB forum to Discourse (today) :slight_smile:

Cheers, Bertrand.

4 Likes