\ No newline at end of file
diff --git a/backend/src/email/reset-password.template.html b/backend/src/email/reset-password.template.html
new file mode 100644
index 000000000..822d20981
--- /dev/null
+++ b/backend/src/email/reset-password.template.html
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/backend/src/email/self-hosted.template.html b/backend/src/email/self-hosted.template.html
new file mode 100644
index 000000000..c62eed7de
--- /dev/null
+++ b/backend/src/email/self-hosted.template.html
@@ -0,0 +1,321 @@
+
+
+
+
+
+
Hello {{name}}!
+
+
+ Thank you so much for purchasing a Self-Hosted licence of Retrospected.
+
+
+
+ You can now use Retrospected on your premises, by using the key below:
+
+
+
{{key}}
+
+
+
Quick Start
+
+ You can be up and running in 5 minutes by using your personalised
+ docker-compose file below.
+ Alternatively, if you would like to customise it or get more details
+ about the installation, please visit our
+ documentation website.
+ You will also find useful information about
+ backup,
+ database management, etc.
+
+
+
+
+
+
+
+
Quick Start
+
+
+ You'll be up and running in no time. Your
+ docker-compose.yml file is ready to go.
+
+ Copy the content at the end of this email, and paste it in that file
+ you created.
+
+
+
+ Optional: Change the various passwords, ports and other
+ settings.
+
+
+ In the same directory, do
+ docker-compose up -d
+
+
You're done!
+
+
+
Warning
+
+ If you wish to change the default passwords, it is very important that
+ you change them
+ BEFORE running docker-compose for the first time. Once run, all
+ passwords are set and modifying them later on will not work (it will
+ actually fail to run).
+
+
+
+
+
+
3 - Enjoy!
+
+
+ Retrospected is now running, on the port defined in your
+ docker-compose.yml file (1800 by default).
+
+
+ You can also access
+ PGAdmin, which will give you access to your database. PGAdmin is available on
+ port 1801 (by default), and you can use the following credentials if you
+ didn't modify the defaults:
+
+
+
Username: {{email}}
+
Password: {{pgAdminPassword}}
+
+
+ If you want more configuration options, have a look at our
+ docker-compose.yml
+ editor here.
+
+
+
+
Let us know if you have any issue, we'll be happy to help!
+
The Retrospected Team
+
+
+
+
Your docker-compose.yml file:
+
+
+
version:'3'
+services:
+ postgres:
+ image: postgres:11.6
+ hostname: postgres
+ environment:
+ # Only change the Database password below BEFORE running for the first time. Once the database
+ # is initialised, you can't change the password anymore.
+ # This password has to be the same as the DB_PASSWORD in the "backend" section below.
+ POSTGRES_PASSWORD: {{dbPassword}}
+
+ # -- Dot not modify --
+ POSTGRES_USER: postgres
+ POSTGRES_DB: retroboard
+ volumes:
+ - database:/var/lib/postgresql/data
+ restart: unless-stopped
+ logging:
+ driver:'json-file'
+ options:
+ max-size:'50m'
+
+ backend:
+ image: antoinejaussoin/retro-board-backend:latest
+ depends_on:
+ - redis
+ environment:
+ LICENCE_KEY: {{key}} # Your personal licence key
+ SELF_HOSTED_ADMIN:'{{email}}'# This is the user who is going to be admin on the self-hosted Retrospected instance.
+ DB_PASSWORD: {{dbPassword}} # Must be the same as POSTGRES_PASSWORD above
+ SESSION_SECRET: {{sessionSecret}} # This can be anything. You don't have to change this.
+
+ restart: unless-stopped
+ logging:
+ driver:'json-file'
+ options:
+ max-size:'50m'
+
+ pgadmin:
+ image: dpage/pgadmin4:4.15# use biarms/pgadmin4 on ARM
+ depends_on:
+ - postgres
+ ports:
+ -'1801:80'# Change 1801 to whatever port you want to access pgAdmin from
+ environment:
+ PGADMIN_DEFAULT_EMAIL:'{{email}}'# This will give you access to PGAdmin to manage your database
+ PGADMIN_DEFAULT_PASSWORD: {{pgAdminPassword}} # Your default password. Change this if you want, but BEFORE running for the first time.
+ volumes:
+ - pgadmin:/var/lib/pgadmin
+ restart: unless-stopped
+ logging:
+ driver:'json-file'
+ options:
+ max-size:'50m'
+
+ frontend:
+ image: antoinejaussoin/retro-board-frontend:latest
+ depends_on:
+ - backend
+ ports:
+ -'1800:80'# Change 1800 to whatever port you want to access Retrospected from
+ restart: unless-stopped
+ logging:
+ driver:'json-file'
+ options:
+ max-size:'50m'
+
+ redis:
+ image: redis:latest
+ depends_on:
+ - postgres
+ restart: unless-stopped
+ logging:
+ driver:'json-file'
+ options:
+ max-size:'50m'
+
+volumes:
+ database:
+ pgadmin:
+
+ );
+}
diff --git a/docs/docs/self-hosting/sendgrid.mdx b/docs/docs/self-hosting/sendgrid.mdx
index 5630f8a94..e600fe47b 100644
--- a/docs/docs/self-hosting/sendgrid.mdx
+++ b/docs/docs/self-hosting/sendgrid.mdx
@@ -1,16 +1,30 @@
-# 📧 Sendgrid
+---
+sidebar_position: 6
+---
-By default, and when using the basic configuration in the [quick-start](quick-start) page,
-your users will be able to register using an email without having to verify that email.
+# 📧 Emails
+A Retrospected instance sometimes need to send email to its users, when they register or want to change their password.
+
+You have three mechanism for sending emails (or not) you can choose from:
+
+- [Sendgrid](https://sendgrid.com)
+- SMTP
+- Nothing: no emails are sent
+
+## Nothing (not recommended)
+
+If you don't specify any mechanism (neither Sendgrid nor SMTP), verification emails won't be sent and users will be able to register any email.
It also means they **won't be able to change their password if they forget it**.
You have two ways of solving this problem:
- Use the [Admin Panel](admin), if you are the admin, to manually change someone else's password
-- Setup Sendgrid so that emails are verified, and recovery emails are sent if a user forgets their password
+- Setup Sendgrid or SMTP so that emails are verified, and recovery emails are sent if a user forgets their password
The latter is what we are going to setup in this guide.
+## SendGrid (recommended)
+
:::info Is it free?
Sendgrid is completely free up to a certain amount of emails per day. For a self-hosted instance, you are very
unlikely to have to pay for it.
@@ -25,48 +39,27 @@ unlikely to have to pay for it.
- Click create, and then copy the key that you've created somewhere safe (we'll need it later)
-### Create the templates
-
-We will need to create two templates, one for the verification email (the one sent after registration),
-and the other one for the password reset email.
-
-- Go to `Email API` and `Dynamic Templates`
-- Click on `Create a Dynamic Template`, and name it `Verification Email`
-- On the created template, click on `Add Version`
-- Select the blank template, and then the `Design Editor`
-- Add a Text field, and add the following content:
-```
-Hello {{name}}!
-
-Please click on the email below to validate your email and start using Retrospected right away.
-
-{{domain}}/validate?email={{email}}&code={{code}}
-```
-- Then save
-- Create another dynamic template, this time named `Reset Password Email`, create a new version, blank template and Design Editor
-- Add a Text field and add the following content:
-```
-Hi {{name}},
-
-To reset your password, follow the link:
-
-{{domain}}/reset?email={{email}}&code={{code}}
-```
-- Click save. You should now have two templates, with one version each, like this:
-
-- Within each template, you have a `Template ID`: copy the two of them (one for each template), we'll need them later.
-
-
### Set the environement variables
We should now have all the information we need.
In the `backend` section of your `docker-compose.yml` file, add the following variables:
- `SENDGRID_API_KEY`: this is the API key you got in the first section of this guide
- `SENDGRID_SENDER`: enter the email you used to create your Sendgrid account
-- `SENDGRID_VERIFICATION_EMAIL_TID`: this is the **Template ID** you created in the second section of this guide, for the **verification email**.
-- `SENDGRID_RESET_PASSWORD_TID`: this is the **Template ID** you created in the second section of this guide, for the **password reset email**.
- `BASE_URL`: this is the URL to your self-hosted Retrospected (for example: `http://retro.mycompany.com`)
### Done!
-Now that it is setup, your users should now need to verify their email and will be able to reset their passwords themselves.
\ No newline at end of file
+Now that it is setup, your users should now need to verify their email and will be able to reset their passwords themselves.
+
+## SMTP
+
+### Setting up SMTP
+
+In the `backend` section of your `docker-compose.yml` file, add the following variables:
+ - `MAIL_SMTP_HOST`: SMTP server host (example: `smtp.myemail.com`)
+ - `MAIL_PORT`: SMTP port (usually `465` for secure SMTP)
+ - `MAIL_SECURE`: If SMTP is using encryption, usually via port 465, set this to `true`
+ - `MAIL_USER`: SMTP username (or email)
+ - `MAIL_PASSWORD`: SMTP user password
+ - `MAIL_SENDER`: SMTP sender email (usually matches `MAIL_USER`)
+
diff --git a/docs/package.json b/docs/package.json
index e04f68f7b..c78dfde16 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -1,6 +1,6 @@
{
"name": "docs",
- "version": "4.13.0",
+ "version": "4.14.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
diff --git a/frontend/package.json b/frontend/package.json
index 0b1ba51c5..403a8abf0 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,6 +1,6 @@
{
"name": "@retrospected/frontend",
- "version": "4.13.0",
+ "version": "4.14.0",
"license": "GNU GPLv3",
"private": true,
"dependencies": {
@@ -18,7 +18,7 @@
"@testing-library/react": "13.0.0",
"@testing-library/react-hooks": "7.0.2",
"@types/crypto-js": "4.1.1",
- "@types/emoji-mart": "^3.0.9",
+ "@types/emoji-mart": "3.0.9",
"@types/jest": "27.4.1",
"@types/lodash": "4.14.181",
"@types/md5": "2.3.2",
@@ -29,15 +29,15 @@
"@types/react-copy-to-clipboard": "5.0.2",
"@types/react-dom": "17.0.14",
"@types/react-helmet": "6.1.5",
- "@types/react-router-dom": "^5.3.3",
+ "@types/react-router-dom": "5.3.3",
"@types/shortid": "0.0.29",
"@types/uuid": "8.3.4",
"bowser": "2.11.0",
- "buffer": "^6.0.3",
+ "buffer": "6.0.3",
"core-js": "3.21.1",
"crypto-js": "4.1.1",
"date-fns": "2.28.0",
- "emoji-mart": "^3.0.1",
+ "emoji-mart": "3.0.1",
"flag-icons": "6.1.1",
"http-proxy-middleware": "2.0.4",
"isemail": "3.2.0",
diff --git a/frontend/src/auth/modal/account/LostPassword.tsx b/frontend/src/auth/modal/account/LostPassword.tsx
index 4cd5e63df..961c8e903 100644
--- a/frontend/src/auth/modal/account/LostPassword.tsx
+++ b/frontend/src/auth/modal/account/LostPassword.tsx
@@ -23,7 +23,7 @@ const LostPassword = () => {
reset();
}, [email]);
- if (!backend.sendGridAvailable && backend.selfHosted) {
+ if (!backend.emailAvailable && backend.selfHosted) {
return (
You are using a Self-Hosted version of Retrospected, without email
diff --git a/frontend/src/common/payloads.ts b/frontend/src/common/payloads.ts
index 053206fa8..a0041f009 100644
--- a/frontend/src/common/payloads.ts
+++ b/frontend/src/common/payloads.ts
@@ -53,7 +53,7 @@ export interface SelfHostedCheckPayload {
export interface BackendCapabilities {
selfHosted: boolean;
- sendGridAvailable: boolean;
+ emailAvailable: boolean;
adminEmail: string;
licenced: boolean;
oAuth: OAuthAvailabilities;
diff --git a/frontend/src/global/state.ts b/frontend/src/global/state.ts
index e12fea756..372f559ff 100644
--- a/frontend/src/global/state.ts
+++ b/frontend/src/global/state.ts
@@ -18,6 +18,6 @@ export const backendCapabilitiesState = atom({
slack: false,
okta: false,
},
- sendGridAvailable: false,
+ emailAvailable: false,
},
});
diff --git a/frontend/yarn.lock b/frontend/yarn.lock
index 02bc73f12..badccdb85 100644
--- a/frontend/yarn.lock
+++ b/frontend/yarn.lock
@@ -2036,7 +2036,7 @@
resolved "https://registry.yarnpkg.com/@types/crypto-js/-/crypto-js-4.1.1.tgz#602859584cecc91894eb23a4892f38cfa927890d"
integrity sha512-BG7fQKZ689HIoc5h+6D2Dgq1fABRa0RbBWKBd9SP/MVRVXROflpm5fhwyATX5duFmbStzyzyycPB8qUYKDH3NA==
-"@types/emoji-mart@^3.0.9":
+"@types/emoji-mart@3.0.9":
version "3.0.9"
resolved "https://registry.yarnpkg.com/@types/emoji-mart/-/emoji-mart-3.0.9.tgz#2f7ef5d9ec194f28029c46c81a5fc1e5b0efa73c"
integrity sha512-qdBo/2Y8MXaJ/2spKjDZocuq79GpnOhkwMHnK2GnVFa8WYFgfA+ei6sil3aeWQPCreOKIx9ogPpR5+7MaOqYAA==
@@ -2299,7 +2299,7 @@
hoist-non-react-statics "^3.3.0"
redux "^4.0.0"
-"@types/react-router-dom@^5.3.3":
+"@types/react-router-dom@5.3.3":
version "5.3.3"
resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.3.3.tgz#e9d6b4a66fcdbd651a5f106c2656a30088cc1e83"
integrity sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==
@@ -3282,7 +3282,7 @@ buffer-indexof@^1.0.0:
resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c"
integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==
-buffer@^6.0.3:
+buffer@6.0.3:
version "6.0.3"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
@@ -4294,7 +4294,7 @@ emittery@^0.8.1:
resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860"
integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==
-emoji-mart@^3.0.1:
+emoji-mart@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/emoji-mart/-/emoji-mart-3.0.1.tgz#9ce86706e02aea0506345f98464814a662ca54c6"
integrity sha512-sxpmMKxqLvcscu6mFn9ITHeZNkGzIvD0BSNFE/LJESPbCA8s1jM6bCDPjWbV31xHq7JXaxgpHxLB54RCbBZSlg==
diff --git a/integration/package.json b/integration/package.json
index 7028acb10..f57acf5e8 100644
--- a/integration/package.json
+++ b/integration/package.json
@@ -1,6 +1,6 @@
{
"name": "retro-board-integration",
- "version": "4.13.0",
+ "version": "4.14.0",
"description": "Integrations tests",
"main": "index.js",
"directories": {
diff --git a/package.json b/package.json
index 447895ab2..0a96a2b72 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "retrospected",
- "version": "4.13.0",
+ "version": "4.14.0",
"description": "An agile retrospective board - Powering www.retrospected.com",
"private": true,
"scripts": {
diff --git a/self-hosting/docker-compose.full.yml b/self-hosting/docker-compose.full.yml
index 3fc140d82..c9b4475a2 100644
--- a/self-hosting/docker-compose.full.yml
+++ b/self-hosting/docker-compose.full.yml
@@ -95,9 +95,12 @@ services:
SQL_LOG: 'false' # Whether to log SQL queries in the console
SENDGRID_API_KEY: # Used for Sendgrid email reminders
SENDGRID_SENDER: # Email to be used as the sender for emails
- SENDGRID_VERIFICATION_EMAIL_TID: # Verification email template ID
- SENDGRID_RESET_PASSWORD_TID: # Reset password email template ID
- SENDGRID_SELF_HOST_EMAIL_TID: # Self host welcome email template ID
+ MAIL_SMTP_HOST: # SMTP server host for sending emails via SMTP (instead of SendGrid)
+ MAIL_PORT: 465 # SMTP port (usually 465 for secure SMTP)
+ MAIL_SECURE: true # If SMTP is using encryption, usually via port 465, set this to true
+ MAIL_USER: # SMTP username (or email)
+ MAIL_PASSWORD: # SMTP user password
+ MAIL_SENDER: # SMTP sender email (usually matches MAIL_USER)
STRIPE_SECRET: # Stripe payment account secret
STRIPE_WEBHOOK_SECRET: # Stripe webhook secret
STRIPE_TEAM_PRODUCT: # Stripe product information