Skip to content

Commit

Permalink
Add env vars to turbo.json
Browse files Browse the repository at this point in the history
  • Loading branch information
phgn0 committed Jun 19, 2024
1 parent 32871d9 commit a2a99de
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
6 changes: 1 addition & 5 deletions apps/web/src/common/typesense.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
// import { PUBLIC_TYPESENSE_SEARCH_API_KEY, PUBLIC_TYPESENSE_URL } from "$env/static/public";
import { PUBLIC_TYPESENSE_SEARCH_API_KEY, PUBLIC_TYPESENSE_URL } from "$env/static/public";
import type { Post, PostType } from "@repo/core/generated/prisma-client";
import Typesense from "typesense";

// Vercel build fails if not hardcoded for some reason
const PUBLIC_TYPESENSE_URL = "o8k5amdihc3vegn7p-1.a1.typesense.net";
const PUBLIC_TYPESENSE_SEARCH_API_KEY = "IRHY5vFh26RNZxoYem0hFs6Gb6ilSOnv";

export const typesense = new Typesense.Client({
nodes: [
{
Expand Down
13 changes: 13 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["**/.env.*local"],
"globalEnv": [
"PUBLIC_TYPESENSE_URL",
"PUBLIC_TYPESENSE_SEARCH_API_KEY",
"SUPABASE_URL",
"SUPABASE_PRIVATE_KEY",
"DATABASE_URL",
"INTERNAL_API_URL",
"OPENAI_API_KEY",
"COHERE_API_KEY",
"PINECONE_API_KEY",
"TYPESENSE_URL",
"TYPESENSE_ADMIN_API_KEY"
],
"tasks": {
"build": {
"dependsOn": ["^build"],
Expand Down

0 comments on commit a2a99de

Please sign in to comment.