Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
π§ Make dev server domain configurable via DEV_DOMAIN (#2668)
Luke Vella7fed5425d344
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex dce01d490..1e3b6265d 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -89,6 +89,14 @@ The following instructions are for running the project locally for development.pnpm dev```+ By default the app is served at `https://web.rallly.test`. To run it at a different domain (e.g. to run multiple dev servers from separate worktrees at the same time), set `DEV_DOMAIN` to the full domain you want:++ ```bash+ DEV_DOMAIN=web-myfeature.rallly.test pnpm dev+ ```++ This registers the domain with portless, allows it as a dev origin in Next.js, and overrides `NEXT_PUBLIC_BASE_URL` so links, assets, and auth callbacks point at the right host. Note that `DEV_DOMAIN` must be set in your shell β setting it in `.env` has no effect because the dev script reads it before Next.js loads env files.+## Translations πTo contribute translations, please check out our [guide for translators](https://support.rallly.co/contribute/translations) which contains all the information you need to get started.diff --git a/apps/web/next.config.ts b/apps/web/next.config.tsindex 8837d744b..c443ed26e 100644--- a/apps/web/next.config.ts+++ b/apps/web/next.config.ts@@ -12,7 +12,7 @@ const withBundleAnalyzer = createBundleAnalyzer({});const nextConfig: NextConfig = {- allowedDevOrigins: ["web.rallly.test"],+ allowedDevOrigins: [process.env.DEV_DOMAIN ?? "web.rallly.test"],experimental: {staleTimes: {dynamic: 60,diff --git a/apps/web/package.json b/apps/web/package.jsonindex 18412d836..4bfcf8b90 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -3,7 +3,7 @@"version": "0.0.0","private": true,"scripts": {- "dev": "portless web.rallly next dev",+ "dev": "domain=${DEV_DOMAIN:-web.rallly.test}; env ${DEV_DOMAIN:+NEXT_PUBLIC_BASE_URL=https://$DEV_DOMAIN} portless ${domain%.test} next dev","build": "next build","build:test": "NODE_ENV=test next build","analyze": "cross-env ANALYZE=true next build",diff --git a/turbo.json b/turbo.jsonindex 3d4c71c66..b829ec887 100644--- a/turbo.json+++ b/turbo.json@@ -39,7 +39,8 @@"dev": {"dependsOn": ["^db:generate"],"cache": false,- "persistent": true+ "persistent": true,+ "passThroughEnv": ["DEV_DOMAIN"]},"start": {"cache": false,