-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: self-hosting docs #323
Conversation
ABCxFF
commented
May 29, 2024
- Allow support for external postgres
- Fix relative paths in opengb build
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.
also needs docs on the database_url under opengb docs /concepts
@@ -1,5 +1,9 @@ | |||
const DEFAULT_DATABASE_URL = "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable"; | |||
|
|||
export function isExternalDatabase(): boolean { | |||
return typeof Deno.env.get("DATABASE_URL") === "string"; |
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.
deno.env.has
@@ -13,11 +14,15 @@ const POSTGRES_ONCE = createOnce<void>(); | |||
*/ | |||
export async function ensurePostgresRunning(project: Project) { | |||
return await getOrInitOnce(POSTGRES_ONCE, async () => { | |||
await ensurePostgresRunningInner(project); | |||
if (isExternalDatabase()) { |
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.
move outside of await, it's faster
@@ -1,5 +1,9 @@ | |||
const DEFAULT_DATABASE_URL = "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable"; | |||
|
|||
export function isExternalDatabase(): boolean { |
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.
add brief docs on what this represents and how external db works
c38096b
to
47c7bd3
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |