Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🥅 Warn instead of failing boot when conferencing has no provider
Luke Vella64649c4fcbab
diff --git a/apps/docs/self-hosting/conferencing.mdx b/apps/docs/self-hosting/conferencing.mdxindex 6b1cbef55..7cb46d3d0 100644--- a/apps/docs/self-hosting/conferencing.mdx+++ b/apps/docs/self-hosting/conferencing.mdx@@ -20,12 +20,12 @@ Each provider needs an OAuth app that you register with the provider yourself. RAdd `CONFERENCING_ENABLED=true` and the provider's variables to your `.env`.</Step><Step title="Restart">- Run `./rallly.sh restart`. **Conferencing** appears in **Settings** for every user.+ Run `./rallly.sh restart`. **Conferencing** appears in **Settings** for every user once a provider is configured.</Step></Steps><ParamField path="CONFERENCING_ENABLED" default="false">- Turns on the Conferencing settings page and the **Add video call** options on the poll form. A provider is offered once its OAuth app variables are set. If this is `true` and no provider is configured, Rallly refuses to start.+ Turns on **Add video call** on the poll form, where organizers can always paste their own link. Each provider whose OAuth app variables are set is offered there and in **Settings** > **Conferencing**. If no provider is configured, Rallly logs a warning at startup and offers none.</ParamField>Every redirect URI below starts with your instance's public address, written as `https://<YOUR_DOMAIN>`. It must match exactly, including the scheme and without a trailing slash.@@ -164,7 +164,7 @@ https://<YOUR_DOMAIN>/api/integrations/callback/webex## Troubleshooting-**Rallly does not start after enabling conferencing.** `CONFERENCING_ENABLED` is `true` but no provider is configured, or only one of `ZOOM_CLIENT_ID` and `ZOOM_CLIENT_SECRET` (or the Webex pair) is set. Run `./rallly.sh logs web` to see which.+**Rallly does not start after adding Zoom or Webex.** Only one of `ZOOM_CLIENT_ID` and `ZOOM_CLIENT_SECRET` (or the Webex pair) is set. Run `./rallly.sh logs web` to see which.**Conferencing does not appear in Settings.** `CONFERENCING_ENABLED` is not `true`, or no provider's variables are set. Restart after editing `.env`.diff --git a/apps/web/src/env.ts b/apps/web/src/env.tsindex 598e18564..b12bb2bdd 100644--- a/apps/web/src/env.ts+++ b/apps/web/src/env.ts@@ -377,30 +377,5 @@ export const env = createEnv({"WEBEX_CLIENT_ID and WEBEX_CLIENT_SECRET must be set together.",});}-- // A flag that is on with nothing behind it would render an empty- // settings page; fail loudly at boot instead of hiding the feature.- const hasZoom = Boolean(env.ZOOM_CLIENT_ID && env.ZOOM_CLIENT_SECRET);- const hasGoogle = Boolean(- env.GOOGLE_CLIENT_ID && env.GOOGLE_CLIENT_SECRET,- );- const hasMicrosoft = Boolean(- env.MICROSOFT_CLIENT_ID && env.MICROSOFT_CLIENT_SECRET,- );- const hasWebex = Boolean(env.WEBEX_CLIENT_ID && env.WEBEX_CLIENT_SECRET);- if (- env.CONFERENCING_ENABLED === "true" &&- !hasZoom &&- !hasGoogle &&- !hasMicrosoft &&- !hasWebex- ) {- ctx.addIssue({- code: "custom",- path: ["CONFERENCING_ENABLED"],- message:- "CONFERENCING_ENABLED is set but no conferencing provider is configured. Set ZOOM_CLIENT_ID and ZOOM_CLIENT_SECRET for Zoom, GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET for Google Meet, MICROSOFT_CLIENT_ID and MICROSOFT_CLIENT_SECRET for Microsoft Teams, or WEBEX_CLIENT_ID and WEBEX_CLIENT_SECRET for Webex, or turn the flag off.",- });- }}),});diff --git a/apps/web/src/instrumentation.ts b/apps/web/src/instrumentation.tsindex f6d0d5e9e..24aee452c 100644--- a/apps/web/src/instrumentation.ts+++ b/apps/web/src/instrumentation.ts@@ -12,6 +12,20 @@ export async function register() {await import("../sentry.server.config");+ // Conferencing is optional, so a switch with no provider behind it must+ // not stop the server; organizers can still paste their own link.+ const { getAvailableConferencingProviders, isConferencingEnabled } =+ await import("@/features/conferencing/constants");+ if (+ isConferencingEnabled &&+ getAvailableConferencingProviders().length === 0+ ) {+ const { createLogger } = await import("@rallly/logger");+ createLogger("conferencing").warn(+ "CONFERENCING_ENABLED is set but no provider is configured, so none is offered. Set the OAuth app variables for Zoom, Google Meet, Microsoft Teams or Webex.",+ );+ }+// On Vercel the house-keeping cron runs the email queue; everywhere else// (dev, the self-hosted image) a long-lived server runs it itself. Never// during a build, which must not touch the database.