Skip to content

Commit

Permalink
Release v4.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinejaussoin authored Oct 16, 2021
1 parent 94a5a6d commit 094ae4a
Show file tree
Hide file tree
Showing 16 changed files with 727 additions and 341 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Alpha Build'

on:
push:
branches: [v490/docker-change]
branches: [v490/release2]

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ This will run a demo version, which you can turn into a fully licenced version b

- Brand new [documentation website](https://docs.retrospected.com).
- Migrate all docker images from `antoinejaussoin/retro-board-*` to `retrospected/*`.
- Allowing Self-Hosted instances to use SendGrid for email recovery
- 🐛 The Unlimited subscription domain check was not accepting valid domains such as `.ventures` or `.agency`.

### Version 4.8.0
Expand Down
15 changes: 14 additions & 1 deletion docs/docs/self-hosting/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,24 @@

Instead of running your containers using `docker-compose up -d`, use `docker-compose up` which will display all the logs in real-time. This will help you determine the cause(s) of your issue(s).

## Migrating images

You are still using `antoinejaussoin/retro-board-frontend` and `antoinejaussoin/retro-board-backend`? You might want to migrate to `retrospected/frontend` and `retrospected/backend` respectively.

Simply update your `docker-compose.yml` file and replace the two images, and restart everything.

The migration will be completely transparent.

:::caution Older versions
The new namespace (`retrospected/*`) only has versions from 4.9.0, plus `latest` and `canary`.
If you are still using an older version, and don't want to update, keep using the old namespace.
:::

## Reset everything

You broke something and can't fix it? It happens. Follow the following to reset all docker containers and volumes to their "factory settings":

:::danger
:::danger This will deleted everything!
The following will delete docker volumes, a.k.a your data, and more precisely your database data and PGAdmin settings.

If your data is actually important, please make a [backup](backup) first.
Expand Down
10 changes: 9 additions & 1 deletion docs/docs/self-hosting/oauth.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 🔐 OAuth

On the public [Retrospected](https://www.retrospected.com) website, you will have noticed that people can register and login in one click using an OAuth provider:
On the public [Retrospected](https://www.retrospected.com) website,
you will have noticed that people can register and login in one click using an OAuth provider:

<img src="/img/self-hosting/oa-1.png" width="300" />

Expand All @@ -16,6 +17,13 @@ We will help you set up OAuth for **Google** and **Github**, but the process is
providers we support: **Okta**, **Microsoft**, **Twitter** and **Slack**.
:::

## Common setup

In order for OAuth to work, you need to setup the `BASE_URL` environement variable on your docker-compose file:
this is the URL to your self-hosted Retrospected (for example: `http://retro.mycompany.com`).

Look [here](optionals) in the full docker-compose file to get an example.


## Github

Expand Down
3 changes: 2 additions & 1 deletion docs/docs/self-hosting/optionals.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ In addition to the basic `docker-compose.yml` file you can [build here](quick-st

These will allow you to add:

- OAuth authentication (logging via Google, GitHub, etc.)
- [OAuth authentication](oauth) (logging via Google, GitHub, etc.)
- [SendGrid](sendgrid) (emails)
- Sentry (error reporting)
- Google Analytics
- Change the default language (for new users)
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/self-hosting/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Create your own customised docker-compose file, using the editor below.

:::tip What about security?
All passwords in this page are generated, **randomly**, **on your browser**.<br />
None of them are known to anyone except you.
None of them are known to anyone except you. They are stored in [local storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) so they are not lost if you reload this page.
You are of course welcome to change them.

Passwords (and other fields) are restricted to **alphanumeric characters** (plus "-", "@", "_", "."), to avoid issues with environement variables and escaping.
Expand Down
26 changes: 18 additions & 8 deletions docs/docs/self-hosting/quick-start/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,31 @@ import queryString from 'query-string';
import RunDetails from './RunDetails';
import useIsBrowser from '@docusaurus/useIsBrowser';
import Toggle from 'react-toggle';
import usePersistedState from './usePersistedState';

function getRandomPassword() {
return randomWords(4).join('-');
}

export default function Editor() {
const isBrowser = useIsBrowser();
const [dbPassword, setDbPassword] = useState(getRandomPassword());
const [pgPassword, setPgPassword] = useState(getRandomPassword());
const [sessionSecret, setSessionSecret] = useState(getRandomPassword());
const [licence, setLicence] = useState('demo');
const [email, setEmail] = useState('[email protected]');
const [port, setPort] = useState('80');
const [pgPort, setPgPort] = useState('81');
const [isArm, setIsArm] = useState(false);
const [dbPassword, setDbPassword] = usePersistedState(
'db-password',
getRandomPassword()
);
const [pgPassword, setPgPassword] = usePersistedState(
'pg-password',
getRandomPassword()
);
const [sessionSecret, setSessionSecret] = usePersistedState(
'session-secret',
getRandomPassword()
);
const [licence, setLicence] = usePersistedState('licence-key', 'demo');
const [email, setEmail] = usePersistedState('email', '[email protected]');
const [port, setPort] = usePersistedState('port', '80');
const [pgPort, setPgPort] = usePersistedState('pg-port', '81');
const [isArm, setIsArm] = usePersistedState('is-arm', false);

useEffect(() => {
if (isBrowser) {
Expand Down
59 changes: 59 additions & 0 deletions docs/docs/self-hosting/quick-start/usePersistedState.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import useIsBrowser from '@docusaurus/useIsBrowser';
import { useState, Dispatch, SetStateAction, useEffect } from 'react';

type UsePersistedStateValue<T> = [T, Dispatch<SetStateAction<T>>];

function getFromLocalStorage<T>(
key: string,
defaultValue: T,
browser: boolean
) {
if (!browser) {
return defaultValue;
}
const current = localStorage.getItem('retrospected-docs-' + key);
if (current) {
return JSON.parse(current) as T;
}
return defaultValue;
}

function storeInLocalStorage<T>(key: string, value: T, browser: boolean) {
if (!browser) {
return;
}
const json = JSON.stringify(value);
localStorage.setItem('retrospected-docs-' + key, json);
}

/**
* Similar to useState, except it persists the data to local storage, and retrieves it automatically when
* mounted. Use it as you would use useState.
* @param key Unique key, used to persist the data in local-storage
* @param defaultValue Default value, of type T
*/
function usePersistedState<T>(
key: string,
defaultValue: T
): UsePersistedStateValue<T> {
const isBrowser = useIsBrowser();
const [state, setState] = useState<T>(
getFromLocalStorage(key, defaultValue, isBrowser)
);

useEffect(() => {
if (isBrowser) {
const storedDefault = getFromLocalStorage(key, defaultValue, isBrowser);
setState(storedDefault);
}
}, [isBrowser]);

useEffect(() => {
storeInLocalStorage(key, state, isBrowser);
}, [state, key]);

return [state, setState];
}

/** @component */
export default usePersistedState;
1 change: 1 addition & 0 deletions docs/docs/self-hosting/sendgrid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ In the `backend` section of your `docker-compose.yml` file, add the following va
- `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!

Expand Down
6 changes: 6 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
gtag: {
// You can also use your "G-" Measurement ID here.
trackingID: 'G-60PPD8ZVHL',
// Optional fields.
anonymizeIP: false, // Should IPs be anonymized?
},
}),
}
);
22 changes: 11 additions & 11 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docs",
"version": "0.0.0",
"version": "4.9.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -15,9 +15,9 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.6",
"@docusaurus/preset-classic": "2.0.0-beta.6",
"@mdx-js/react": "^1.6.21",
"@docusaurus/core": "2.0.0-beta.7",
"@docusaurus/preset-classic": "2.0.0-beta.7",
"@mdx-js/react": "^1.6.22",
"@svgr/webpack": "^5.5.0",
"@types/random-words": "^1.1.2",
"@types/react-copy-to-clipboard": "^5.0.1",
Expand All @@ -28,20 +28,20 @@
"prism-react-renderer": "^1.2.1",
"query-string": "^7.0.1",
"random-words": "^1.1.1",
"react": "^17.0.1",
"react": "^17.0.2",
"react-copy-to-clipboard": "^5.0.4",
"react-dom": "^17.0.1",
"react-dom": "^17.0.2",
"react-syntax-highlighter": "^15.4.4",
"react-toggle": "^4.1.2",
"url-loader": "^4.1.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.6",
"@docusaurus/module-type-aliases": "2.0.0-beta.7",
"@tsconfig/docusaurus": "^1.0.4",
"@types/react": "^17.0.14",
"@types/react-helmet": "^6.1.2",
"@types/react-router-dom": "^5.1.8",
"typescript": "^4.3.5"
"@types/react": "^17.0.30",
"@types/react-helmet": "^6.1.4",
"@types/react-router-dom": "^5.3.1",
"typescript": "^4.4.4"
},
"browserslist": {
"production": [
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export default function Home(): JSX.Element {
const { siteConfig } = useDocusaurusContext();
return (
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />"
title={`Docs - ${siteConfig.title}`}
description="Documentation for Retrospected"
>
<HomepageHeader />
<main>
Expand Down
Loading

0 comments on commit 094ae4a

Please sign in to comment.