diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b5225149e..8d70b7c1af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog + + +## 2.4.1 (2023-03-16) + +### Added + +- 📈 Capture participant email in posthog ([#569](https://github.com/lukevella/Rallly/issues/569)) [[62a5c65](https://github.com/lukevella/Rallly/commit/62a5c6580305a1f4c0d8c5e6f17b17194f15b5c2)] + +### Changed + +- 📌 Pin base image version for Dockerfile [[213badd](https://github.com/lukevella/Rallly/commit/213badde9ba2f3bc0c6f18761202dd80920eb29c)] +- 🔧 Pin node version [[e85669d](https://github.com/lukevella/Rallly/commit/e85669ddf0170cc9870278192bd3966097d70ab4)] + +### Fixed + +- 🐛 Fix `DISABLE_LANDING_PAGE` not working ([#572](https://github.com/lukevella/Rallly/issues/572)) [[86eaf5d](https://github.com/lukevella/Rallly/commit/86eaf5df10bfaf529afe3e92b4dbbd9ccde18b51)] + +### Miscellaneous + +- 📝 Update README.md [[5962b6c](https://github.com/lukevella/Rallly/commit/5962b6c8f1a9977f4eeea31c0225729c4a6be5b2)] +- 📝 Fix typo [[3bb1eb8](https://github.com/lukevella/Rallly/commit/3bb1eb8ac603783ef1e8f04d914cb109adf831e5)] +- 📝 Update README [[4f98f4b](https://github.com/lukevella/Rallly/commit/4f98f4be6fb7749adad549d8fb23d45ae6b2ffc4)] +- 🌐 New translations app.json (French) ([#567](https://github.com/lukevella/Rallly/issues/567)) [[ec3d300](https://github.com/lukevella/Rallly/commit/ec3d300736a850669af7948a015be555587ca044)] + ## 2.4.0 (2023-03-15) diff --git a/README.md b/README.md index d8532ffb0a..3c56a86293 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,6 @@ Built with [Next.js](https://github.com/vercel/next.js/), [Prisma](https://githu Check out the [self-hosting repo](https://github.com/lukevella/rallly-selfhosted) for more information on running your own instance of Rallly. -_[2023-01-12]: The docker configuration for self-hosters previously stored in this repo has been moved to the self-hosting repo mentioned above. Please switch to that repo if you are self-hosting._ - ## Running locally Clone this repo and change directory to the root of the repository. @@ -55,19 +53,22 @@ yarn build yarn start ``` -## Configuration - -| Parameter | Default | Description | -| -------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| NEXT_PUBLIC_BASE_URL | http://localhost:3000 | The hosting url of the server, used for creating links and making api calls from the client. | -| DATABASE_URL | - | A postgres database URL. Leave out if using the docker-compose file since it will spin up and connect to its own database instance. | -| SECRET_PASSWORD | - | A long string (minimum 32 characters) that is used to encrypt session data. | -| SUPPORT_EMAIL | - | An email address that will appear as the FROM email for all emails being sent out. | -| SMTP_HOST | - | Host name of your SMTP server | -| SMTP_PORT | - | Port of your SMTP server | -| SMTP_SECURE | false | Set to "true" if SSL is enabled for your SMTP connection | -| SMTP_USER | - | Username to use for your SMTP connection | -| SMTP_PWD | - | Password to use for your SMTP connection | +## Configuration Options + +The app can be configured with the following environment variables. + +| Environment Variable | Default | Description | +| ----------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `AUTH_REQUIRED` | `false` | Set to `true` to require authentication for creating new polls and accessing admin pages | +| `ALLOWED_EMAILS` | `""` | Comma separated list of email addresses that are allowed to register and login. Wildcard characters are supported. Example: `*@yourcompany.com` | +| `DISABLE_LANDING_PAGE` | `false` | Whether or not to disable the landing page | +| `NEXT_PUBLIC_BASE_URL` | `http://localhost:3000` | The base url where this instance is accessible, including the scheme (eg. `http://` or `https://`), the domain name, and optionally a port. | +| `SECRET_PASSWORD` | `""` | A random 32-character secret key used to encrypt user sessions | +| `SMTP_HOST` | `localhost` | The host address of your SMTP server | +| `SMTP_PORT` | 25 or 465 | The port of your SMTP server | +| `SMTP_SECURE` | false | Set to "true" if SSL is enabled for your SMTP connection | +| `SMTP_USER` | `""` | The username (if auth is enabled on your SMTP server) | +| `SMTP_PWD` | `""` | The password (if auth is enabled on your SMTP server) | ## Contributors diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 013b45a62c..3c4e1769e4 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -1,11 +1,11 @@ -FROM node:lts AS builder +FROM node:16 AS builder WORKDIR /app RUN yarn global add turbo COPY . . RUN turbo prune --scope=@rallly/web --docker -FROM node:lts AS installer +FROM node:16 AS installer WORKDIR /app COPY .gitignore .gitignore @@ -19,7 +19,7 @@ COPY turbo.json turbo.json RUN yarn db:generate RUN yarn build -FROM node:lts AS runner +FROM node:16 AS runner WORKDIR /app diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 681057b7a4..f1e63cc19d 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -40,8 +40,7 @@ const nextConfig = { return [ { source: "/", - destination: - process.env.DISABLE_LANDING_PAGE === "true" ? "/new" : "/home", + destination: "/home", }, ]; }, diff --git a/apps/web/public/locales/fr/app.json b/apps/web/public/locales/fr/app.json index 30ef3955f8..125672b15d 100644 --- a/apps/web/public/locales/fr/app.json +++ b/apps/web/public/locales/fr/app.json @@ -39,6 +39,7 @@ "editDetails": "Modifier les détails", "editOptions": "Modifier les options", "email": "Email", + "emailNotAllowed": "Cet e-mail n'est pas autorisé.", "emailPlaceholder": "jessie.smith@email.com", "endingGuestSessionNotice": "Une fois que la session d'un invité est terminée, elle ne peut pas être reprise. Vous ne pourrez pas modifier les votes ou les commentaires que vous avez faits lors de cette session.", "endSession": "Fin de la session", diff --git a/apps/web/src/components/poll/mutations.ts b/apps/web/src/components/poll/mutations.ts index e16289df8a..866efe4c29 100644 --- a/apps/web/src/components/poll/mutations.ts +++ b/apps/web/src/components/poll/mutations.ts @@ -15,10 +15,11 @@ export const normalizeVotes = ( export const useAddParticipantMutation = () => { return trpc.polls.participants.add.useMutation({ - onSuccess: (_, { pollId, name }) => { + onSuccess: (_, { pollId, name, email }) => { posthog.capture("add participant", { pollId, name, + email, }); }, }); diff --git a/apps/web/src/pages/home.tsx b/apps/web/src/pages/home.tsx index ee7043acbc..260ece4dfd 100644 --- a/apps/web/src/pages/home.tsx +++ b/apps/web/src/pages/home.tsx @@ -12,7 +12,7 @@ export const getServerSideProps: GetServerSideProps = composeGetServerSideProps( async () => { // TODO (Luke Vella) [2023-03-14]: Remove this once we split the app from the landing page if (process.env.DISABLE_LANDING_PAGE === "true") { - return { notFound: true }; + return { redirect: { destination: "/new", permanent: false } }; } return { props: {} }; }, diff --git a/package.json b/package.json index a36336d81f..8edc7ab1b2 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "rallly", "private": true, - "version": "2.4.0", + "version": "2.4.1", "scripts": { "dev": "turbo dev", + "start": "turbo run start --filter=@rallly/web...", "build": "turbo run build --filter=@rallly/web...", "db:deploy": "turbo db:deploy", "db:generate": "turbo db:generate", @@ -24,7 +25,7 @@ "turbo": "^1.8.3" }, "engines": { - "node": ">=16.0.0" + "node": "16.x" }, "packageManager": "yarn@1.22.19" }