Skip to content
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

Closed

Conversation

ABCxFF
Copy link
Collaborator

@ABCxFF ABCxFF commented May 29, 2024

  • Allow support for external postgres
  • Fix relative paths in opengb build

@ABCxFF ABCxFF added the enhancement New feature or request label May 29, 2024
@ABCxFF ABCxFF requested a review from NathanFlurry May 29, 2024 03:26
Copy link
Member

@NathanFlurry NathanFlurry left a 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";
Copy link
Member

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()) {
Copy link
Member

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 {
Copy link
Member

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

@ABCxFF ABCxFF force-pushed the 05-22-fix-build-disable-psql-check-when-unneeded branch from c38096b to 47c7bd3 Compare May 29, 2024 03:41
Copy link
Collaborator Author

ABCxFF commented May 29, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ABCxFF and the rest of your teammates on Graphite Graphite

@NathanFlurry NathanFlurry changed the title feat: Prepare for running locally (see desc) feat: self-hosting docs Jun 8, 2024
@NathanFlurry NathanFlurry marked this pull request as draft July 4, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants