diff --git a/proxy/logger.ts b/proxy/logger.ts index cf8f8e4334..52183be9e1 100644 --- a/proxy/logger.ts +++ b/proxy/logger.ts @@ -1,4 +1,7 @@ -import { getEnv } from "../src/platform/compat/process.ts"; +// Inline getEnv to avoid dependency on src/platform/compat (not copied in Docker) +function getEnv(key: string): string | undefined { + return Deno.env.get(key); +} import { getTraceContext } from "./tracing.ts"; export type LogLevel = "debug" | "info" | "warn" | "error"; diff --git a/proxy/main.ts b/proxy/main.ts index 096c1863e7..0d86be6715 100644 --- a/proxy/main.ts +++ b/proxy/main.ts @@ -33,7 +33,7 @@ import { proxyLogger } from "./logger.ts"; // Configuration from environment variables const config = { apiBaseUrl: Deno.env.get("VERYFRONT_API_BASE_URL") || - "http://api.veryfront.dev:4000", + "http://api.lvh.me:4000", clientId: Deno.env.get("OAUTH_CLIENT_ID") || "", clientSecret: Deno.env.get("OAUTH_CLIENT_SECRET") || "", previewClientId: Deno.env.get("OAUTH_PREVIEW_CLIENT_ID") || "", diff --git a/src/core/config/env.ts b/src/core/config/env.ts index 6786623721..b587eface0 100644 --- a/src/core/config/env.ts +++ b/src/core/config/env.ts @@ -13,7 +13,7 @@ export function getDisableLruIntervalEnv(): boolean { export function getApiBaseUrlEnv(): string { return getEnv("VERYFRONT_API_BASE_URL") || getEnv("VERYFRONT_API_URL")?.replace("/graphql", "/api") || - "http://api.veryfront.dev:4000"; + "http://api.lvh.me:4000"; } export function getSsrMaxConcurrentTransformsEnv(defaultValue = 3): number { diff --git a/veryfront.config.ts b/veryfront.config.ts index 250f844b34..d4f3648528 100644 --- a/veryfront.config.ts +++ b/veryfront.config.ts @@ -11,9 +11,9 @@ */ // Default URLs -const DEFAULT_API_URL_LOCAL = "http://api.veryfront.dev:4000"; +const DEFAULT_API_URL_LOCAL = "http://api.lvh.me:4000"; const DEFAULT_API_URL_PROD = "https://api.veryfront.com"; -const DEFAULT_CORS_ORIGIN_LOCAL = "http://api.veryfront.dev:4000"; +const DEFAULT_CORS_ORIGIN_LOCAL = "http://api.lvh.me:4000"; class ConfigError extends Error { constructor(message: string) { @@ -29,7 +29,8 @@ class ConfigError extends Error { let env: Record = {}; try { const { load } = await import("https://deno.land/std@0.220.0/dotenv/mod.ts"); - env = await load({ envPath: ".env" }); + // examplePath: null skips validation against .env.example (which requires all vars) + env = await load({ envPath: ".env", examplePath: null }); } catch { // .env doesn't exist (production) - use environment variables only } @@ -155,7 +156,7 @@ export default useGitHub ? { // Dev server config (ignored in production) dev: { port: 3001, - host: "veryfront.dev", + host: "lvh.me", hmr: contentSource.type === "branch", // Only enable HMR for branch mode },