Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
fix: update env variable names
Andras Bacsai54bb9b2cd7ae
diff --git a/apps/designer/.env.example b/apps/designer/.env.exampleindex ff43cee560..a87c3a1d3c 100644--- a/apps/designer/.env.example+++ b/apps/designer/.env.example@@ -1,4 +1,4 @@-DESIGNER_DOMAIN=webstudio.is+DESIGNER_HOST=webstudio.isDATABASE_URL=postgresql://user:pass@localhost/webstudioAUTH_SECRET="# Linux: `openssl rand -hex 32` or go to https://generate-secret.now.sh/64"GH_CLIENT_SECRET=@@ -22,5 +22,5 @@ ASSET_CDN_URL=# Publish to edgePUBLISHER_ENDPOINT=-PUBLISHER_DOMAIN=+PUBLISHER_HOST=PUBLISHER_TOKEN=diff --git a/apps/designer/app/designer/features/topbar/publish.tsx b/apps/designer/app/designer/features/topbar/publish.tsxindex 413b135265..c46fad29a4 100644--- a/apps/designer/app/designer/features/topbar/publish.tsx+++ b/apps/designer/app/designer/features/topbar/publish.tsx@@ -19,11 +19,11 @@ import env from "~/shared/env";type PublishButtonProps = { project: Project };-const host = () => {- if (env.PUBLISHER_ENDPOINT && env.PUBLISHER_DOMAIN) {- return env.PUBLISHER_DOMAIN;+const getHost = () => {+ if (env.PUBLISHER_ENDPOINT && env.PUBLISHER_HOST) {+ return env.PUBLISHER_HOST;}- return env.DESIGNER_DOMAIN || location.host;+ return env.DESIGNER_HOST || location.host;};const Content = ({ project }: PublishButtonProps) => {@@ -36,7 +36,7 @@ const Content = ({ project }: PublishButtonProps) => {if (typeof location !== "object" || !domain) {return;}- setUrl(`${location.protocol}//${domain}.${host()}`);+ setUrl(`${location.protocol}//${domain}.${getHost()}`);}, [domain]);return (@@ -65,7 +65,7 @@ const Content = ({ project }: PublishButtonProps) => {textOverflow: "ellipsis",}}>- {`${domain}.${host()}`}{" "}+ {`${domain}.${getHost()}`}{" "}</Text><ExternalLinkIcon /></Link>diff --git a/apps/designer/app/env.server.ts b/apps/designer/app/env.server.tsindex 1c5eeb46f4..9cee802a68 100644--- a/apps/designer/app/env.server.ts+++ b/apps/designer/app/env.server.ts@@ -5,9 +5,9 @@ const env = {VERCEL_ENV: process.env.VERCEL_ENV,DEBUG: process.env.DEBUG,FEATURES: process.env.FEATURES,- DESIGNER_DOMAIN: process.env.DESIGNER_DOMAIN,+ DESIGNER_HOST: process.env.DESIGNER_HOST,PUBLISHER_ENDPOINT: process.env.PUBLISHER_ENDPOINT || null,- PUBLISHER_DOMAIN: process.env.PUBLISHER_DOMAIN || null,+ PUBLISHER_HOST: process.env.PUBLISHER_HOST || null,} as const;export default env;diff --git a/apps/designer/env-check.js b/apps/designer/env-check.jsindex 08652df586..6be9b28154 100644--- a/apps/designer/env-check.js+++ b/apps/designer/env-check.js@@ -35,9 +35,9 @@ if (process.env.DEPLOYMENT_ENVIRONMENT === "production") {"👉 In production DEPLOYMENT_URL is required for website functionality. Please set it to your production URL.");}- if (!process.env.DESIGNER_DOMAIN) {+ if (!process.env.DESIGNER_HOST) {errors.push(- "👉 In production DESIGNER_DOMAIN is required for website functionality. Please set it to your production URL of the designer."+ "👉 In production DESIGNER_HOST is required for website functionality. Please set it to your production URL of the designer.");}}