Skip to content

Commit

Permalink
fix: setting NHOST_GRAPHQL_URL to match to self-hosting env
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Jun 27, 2024
1 parent 1659ae3 commit db66dbb
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 169 deletions.
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ BASE_HOSTNAME=.traefik.me

## dynamic public
PUBLIC_GRAPHQL_ENDPOINT=https://hasura${BASE_HOSTNAME}/v1/graphql
# PUBLIC_GRAPHQL_ENDPOINT=https://local.hasura.nhost.run/v1/graphql
PUBLIC_DEFAULT_ORGANIZATION=chinthagunta

PUBLIC_NHOST_SUBDOMAIN=local
Expand All @@ -35,7 +34,7 @@ AUTH_CLIENT_URL=https://console${BASE_HOSTNAME}:5173
# nhost SDK use `PUBLIC_NHOST_SUBDOMAIN` and `PUBLIC_NHOST_REGION` to infer below variables
NHOST_HASURA_URL=https://hasura${BASE_HOSTNAME}/console
NHOST_AUTH_URL=https://auth${BASE_HOSTNAME}/v1
NHOST_GRAPHQL_URL=https://graphql${BASE_HOSTNAME}/v1
NHOST_GRAPHQL_URL=https://hasura${BASE_HOSTNAME}/v1/graphql
NHOST_STORAGE_URL=https://storage${BASE_HOSTNAME}/v1
NHOST_FUNCTIONS_URL=https://functions${BASE_HOSTNAME}/v1
# we need alias for public urls of nhost-broswer-client
Expand Down
2 changes: 1 addition & 1 deletion .env.prod.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PUBLIC_NHOST_REGION=eu-central-1
# nhost SDK use `PUBLIC_NHOST_SUBDOMAIN` and `PUBLIC_NHOST_REGION` to infer below variables
NHOST_HASURA_URL=https://zyjloswljirxqtsdlnnf.hasura.eu-central-1.nhost.run/console
NHOST_AUTH_URL=https://zyjloswljirxqtsdlnnf.auth.eu-central-1.nhost.run/v1
NHOST_GRAPHQL_URL=https://zyjloswljirxqtsdlnnf.graphql.eu-central-1.nhost.run/v1
NHOST_GRAPHQL_URL=https://zyjloswljirxqtsdlnnf.hasura.eu-central-1.nhost.run/v1/graphql
NHOST_STORAGE_URL=https://zyjloswljirxqtsdlnnf.storage.eu-central-1.nhost.run/v1
NHOST_FUNCTIONS_URL=https://zyjloswljirxqtsdlnnf.functions.eu-central-1.nhost.run/v1

Expand Down
4 changes: 2 additions & 2 deletions .secrets.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# https://generate-secret.vercel.app/64 to generate a secret.
GRAFANA_ADMIN_PASSWORD = 'FIXME'
HASURA_GRAPHQL_ADMIN_SECRET = 'hasura-admin-secret'
HASURA_GRAPHQL_JWT_SECRET_KEY = 'FIXME'
HASURA_GRAPHQL_JWT_SECRET_KEY = 'hasura-really-long-jwt-secret-key'
NHOST_WEBHOOK_SECRET = 'hasura-webhook-secret'
POSTGRES_PASSWORD = 'FIXME'
POSTGRES_PASSWORD = 'postgres'

## AUTH PROVIDERS
AUTH_PROVIDER_AZUREAD_CLIENT_ID = 'FIXME'
Expand Down
155 changes: 1 addition & 154 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,79 +86,6 @@
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 1000,
"files.exclude": {
".changeset": true,
".dockerignore": true,
".editorconfig": true,
".env": true,
".env.development.local": true,
".env.example": true,
".env.local": true,
".env.prod": true,
".env.prod.example": true,
".env.test": true,
".git": true,
".gitattributes": true,
".github": true,
".gitignore": true,
".markdownlintignore": true,
".markuplintrc.cjs": true,
".nhost": true,
".npmrc": true,
".secrets": true,
".secrets.example": true,
".secrets.prod": true,
".secrets.prod.example": true,
".textlintignore": true,
".turbo": true,
".vercel": true,
".vercelignore": true,
".vscode": true,
"CHANGELOG.md": true,
"CODE_OF_CONDUCT.md": true,
"CONTRIBUTING.md": true,
"DEVELOPERS.md": true,
"Dockerfile": true,
"LICENSE": true,
"Makefile": true,
"README.md": true,
"TODO": true,
"biome.jsonc": true,
"bun.Dockerfile": true,
"bun.lockb": true,
"cog.toml": true,
"compose.nhost.yml": true,
"compose.override.yml": true,
"compose.yml": true,
"config": true,
"config.yaml": true,
"degit.json": true,
"docs": true,
"flake.nix": true,
"functions": true,
"infra": true,
"nhost": true,
"node_modules": true,
"package.json": true,
"packages": true,
"patches": true,
"pnpm-lock.yaml": true,
"pnpm-workspace.yaml": true,
"scripts": true,
"turbo.json": true,
"vercel.json": true,
"vitest.config.ts": true,
"vitest.workspaces.ts": true,
"apps/console-fb": true,
"apps/console-sc": true,
"apps/docs": true,
"apps/playground": true,
"apps/web": true,
"packages/assets": true,
"packages/biome-config": true,
"packages/skeleton-ui": true,
"packages/typescript-config": true,
"packages/ui": true,
"packages/utils": true,
"**/.git": true,
"**/.DS_Store": true,
".idea": true,
Expand Down Expand Up @@ -399,85 +326,5 @@
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"redhat.telemetry.enabled": false,
"monorepoFocusWorkspace.internal": {
"spectacular": {
"managedFilesIgnoreEntries": [
".changeset",
".dockerignore",
".editorconfig",
".env",
".env.development.local",
".env.example",
".env.local",
".env.prod",
".env.prod.example",
".env.test",
".git",
".gitattributes",
".github",
".gitignore",
".markdownlintignore",
".markuplintrc.cjs",
".nhost",
".npmrc",
".secrets",
".secrets.example",
".secrets.prod",
".secrets.prod.example",
".textlintignore",
".turbo",
".vercel",
".vercelignore",
".vscode",
"CHANGELOG.md",
"CODE_OF_CONDUCT.md",
"CONTRIBUTING.md",
"DEVELOPERS.md",
"Dockerfile",
"LICENSE",
"Makefile",
"README.md",
"TODO",
"biome.jsonc",
"bun.Dockerfile",
"bun.lockb",
"cog.toml",
"compose.nhost.yml",
"compose.override.yml",
"compose.yml",
"config",
"config.yaml",
"degit.json",
"docs",
"flake.nix",
"functions",
"infra",
"nhost",
"node_modules",
"package.json",
"packages",
"patches",
"pnpm-lock.yaml",
"pnpm-workspace.yaml",
"scripts",
"turbo.json",
"vercel.json",
"vitest.config.ts",
"vitest.workspaces.ts",
"apps/console-fb",
"apps/console-sc",
"apps/docs",
"apps/playground",
"apps/web",
"packages/assets",
"packages/biome-config",
"packages/skeleton-ui",
"packages/typescript-config",
"packages/ui",
"packages/utils"
],
"focusedWorkspace": "console"
}
}
"redhat.telemetry.enabled": false
}
2 changes: 1 addition & 1 deletion apps/console/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="%paraglide.lang%" dir="%paraglide.textDirection%" class="dark">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<link rel="icon" type="image/svg+xml" href="%sveltekit.assets%/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
Expand Down
8 changes: 4 additions & 4 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ services:
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/postgres?sslmode=allow
# HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/postgres?sslmode=allow
HASURA_GRAPHQL_JWT_SECRET: '{ "type": "HS256", "key": "${HASURA_GRAPHQL_JWT_SECRET_KEY}"}'
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET:-hasura-admin-secret}
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
HASURA_GRAPHQL_ENABLE_CONSOLE: 'true'
HASURA_GRAPHQL_LOG_LEVEL: warn
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup
Expand Down Expand Up @@ -250,7 +250,7 @@ services:
AUTH_WEBAUTHN_ENABLED: 'true'
AUTH_WEBAUTHN_RP_NAME: ${APP_DESCRIPTION}
AUTH_WEBAUTHN_RP_ORIGINS: ${AUTH_CLIENT_URL:-https://console${BASE_HOSTNAME}:5173,https://console.traefik.me}
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET:-hasura-admin-secret}
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/postgres
POSTGRES_MIGRATIONS_CONNECTION: postgres://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/postgres
HASURA_GRAPHQL_GRAPHQL_URL: http://graphql:8080/v1/graphql
Expand Down Expand Up @@ -341,7 +341,7 @@ services:
DEBUG: 'true'
# CLAMAV_SERVER: tcp://run-clamav:3310
HASURA_ENDPOINT: http://graphql:8080/v1
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET:-hasura-admin-secret}
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
HASURA_METADATA: '1'
POSTGRES_MIGRATIONS: '1'
POSTGRES_MIGRATIONS_SOURCE: postgres://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/postgres?sslmode=disable
Expand Down Expand Up @@ -387,7 +387,7 @@ services:
profiles: [all]
environment:
NEXT_PUBLIC_ENV: dev
NEXT_PUBLIC_NHOST_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET:-hasura-admin-secret}
NEXT_PUBLIC_NHOST_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
NEXT_PUBLIC_NHOST_AUTH_URL: https://auth${BASE_HOSTNAME}/v1
NEXT_PUBLIC_NHOST_CONFIGSERVER_URL: https://dashboard${BASE_HOSTNAME}/v1/configserver/graphql
NEXT_PUBLIC_NHOST_FUNCTIONS_URL: https://functions${BASE_HOSTNAME}/v1
Expand Down
2 changes: 1 addition & 1 deletion config/base/hasura/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
nginx.ingress.kubernetes.io/server-alias: 'hasura.local.ii.coop, hasura.local.ii.nz, hasura.local.sharing.io'
spec:
rules:
- host: local.hasura.nhost.run
- host: hasura.traefik.me
http:
paths:
- path: /
Expand Down
3 changes: 1 addition & 2 deletions nhost/nhost.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ maxDepthQueries = 4

[functions]
[functions.node]
version = 18
version = 20

[auth]
version = '0.32.0'
Expand Down Expand Up @@ -176,7 +176,6 @@ enabled = false
enabled = true

[auth.method.webauthn.relyingParty]
# id = 'Spectacular'
name = 'Spectacular Console App'
origins = ['https://console.traefik.me:5173', 'https://console.traefik.me']

Expand Down
4 changes: 2 additions & 2 deletions nhost/tests/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PUBLIC_GRAPHQL_ENDPOINT= 'https://local.hasura.nhost.run/v1/graphql'
HASURA_GRAPHQL_ADMIN_SECRET = 'sectet'
PUBLIC_GRAPHQL_ENDPOINT= 'https://hasura.traefik.me/v1/graphql'
HASURA_GRAPHQL_ADMIN_SECRET = 'hasura-admin-secret'

0 comments on commit db66dbb

Please sign in to comment.