-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Configure cron db from environment #628
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! While you're here, you might want to also update the docker compose to specify your dockerfile instead of the postgres:14 image. I think the image tag is overriding the usage of your new postgres Dockerfile.
Think just need a small update to the integ tests too.
} | ||
|
||
const defaultConfig: Config = { | ||
cronDatabase: process.env.CRON_DATABASE, | ||
hasuraHostOverride: process.env.HASURA_HOST_OVERRIDE, | ||
hasuraPortOverride: process.env.HASURA_POST_OVERRIDE ? Number(process.env.HASURA_POST_OVERRIDE) : undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: HASURA_PORT_OVERRIDE
PORT vs POST
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, that's not a nit, that's a genuine error :D
hasuraHostOverride: process.env.HASURA_HOST_OVERRIDE, | ||
hasuraPortOverride: process.env.HASURA_POST_OVERRIDE ? Number(process.env.HASURA_POST_OVERRIDE) : undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be useful for local development, i.e. we start Runner outside of docker, and therefore need to use a different host/
port` value to communicate with Postgres. These should only exist within local dev.
c97c2b4
to
03ee9a1
Compare
The admin/cron connection is currently hard-coded to the
cron
database, but this needs to be configurable so that we can use the default DB (postgres
) locally.Additionally, this PR combines the
pgbouncer
/pg_cron
init scripts and uses the combined output in both docker compose and integration tests.