Skip to content
Discussion options

You must be logged in to vote

@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 public plus a _prisma_migrations table, and the job queue creates its own pgboss schema; ownership covers all of that (on Postgres 15 and later the database owner also owns public). Migrations run on every container start, so there is no separate step to run.

CREATE ROLE healthlog LOGIN PASSWORD '...';
CREATE DATABASE healthlog OWNER healthlog;

On the compose side, put

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@sreeramachandramurthy
Comment options

Comment options

You must be logged in to vote
1 reply
@sreeramachandramurthy
Comment options

Answer selected by sreeramachandramurthy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants