diff --git a/common/src/envs/constants.ts b/common/src/envs/constants.ts index 03bd8d8..6c1d9fb 100644 --- a/common/src/envs/constants.ts +++ b/common/src/envs/constants.ts @@ -19,7 +19,7 @@ export const LOCAL_WEB_DOMAIN = 'localhost:3000'; export const LOCAL_BACKEND_DOMAIN = 'localhost:8088'; export const IS_GOOGLE_CLOUD = !!process.env.GOOGLE_CLOUD_PROJECT -export const IS_VERCEL = !!process.env.VERCEL +export const IS_VERCEL = !!process.env.NEXT_PUBLIC_VERCEL export const IS_LOCAL = !IS_GOOGLE_CLOUD && !IS_VERCEL export const HOSTING_ENV = IS_GOOGLE_CLOUD ? 'Google Cloud' : IS_VERCEL ? 'Vercel' : IS_LOCAL ? 'local' : 'unknown' console.log(`Running in ${HOSTING_ENV}`, isProd() ? '(prod)' : '(dev)'); diff --git a/web/README.md b/web/README.md index dff8406..af4f1af 100644 --- a/web/README.md +++ b/web/README.md @@ -4,6 +4,17 @@ This is the folder for the web application. ### Information +##### Setup + +This is the setup for deployment on Vercel, which you only need to do if you create a new platform from scratch, not if you are contributing to Compass + +Set up a Vercel account and link it to your GitHub repository. + +Add the following environment variables and the ones in `.env` in the Vercel dashboard: +```bash +NEXT_PUBLIC_VERCEL=1 +``` + ##### `next` version The `next` version is 14.1.0, as we get the following error with 15.1.2 and above when accessing `/[username]` pages on Vercel: