How to connect to an existing external PostgreSQL instance? #936
|
I have already a docker instance of Is there a guide or steps to follow? I noticed we can update the environmental variable |
Replies: 2 comments 2 replies
|
@sreeramachandramurthy thanks for asking this one; it turned out nobody had written it down. There is a page for it now: https://docs.healthlog.dev/self-hosting/external-postgres/ The short version: the role needs no superuser and no extensions. Make it the owner of the database and you are done. The app creates its tables in CREATE ROLE healthlog LOGIN PASSWORD '...';
CREATE DATABASE healthlog OWNER healthlog;On the compose side, put If anything on that page does not match what you see, say so here and I will fix the page. |
@sreeramachandramurthy thanks for asking this one; it turned out nobody had written it down. There is a page for it now: https://docs.healthlog.dev/self-hosting/external-postgres/
The short version: the role needs no superuser and no extensions. Make it the owner of the database and you are done. The app creates its tables in
publicplus a_prisma_migrationstable, and the job queue creates its ownpgbossschema; ownership covers all of that (on Postgres 15 and later the database owner also ownspublic). Migrations run on every container start, so there is no separate step to run.On the compose side, put