feat(*): allow to select auth providers + add multiworkspace with subdomain management (#8656)

## Summary
Add support for multi-workspace feature and adjust configurations and
states accordingly.
- Introduced new state isMultiWorkspaceEnabledState.
- Updated ClientConfigProviderEffect component to handle
multi-workspace.
- Modified GraphQL schema and queries to include multi-workspace related
configurations.
- Adjusted server environment variables and their respective
documentation to support multi-workspace toggle.
- Updated server-side logic to handle new multi-workspace configurations
and conditions.
This commit is contained in:
Antoine Moreaux
2024-12-03 19:06:28 +01:00
committed by GitHub
parent 9a65e80566
commit 7943141d03
167 changed files with 5180 additions and 1901 deletions

View File

@ -37,9 +37,12 @@ yarn command:prod cron:calendar:ongoing-stale
['PG_DATABASE_URL', 'postgres://user:pw@localhost:5432/default?connection_limit=1', 'Database connection'],
['PG_SSL_ALLOW_SELF_SIGNED', 'false', 'Allow self signed certificates'],
['REDIS_URL', 'redis://localhost:6379', 'Redis connection url'],
['FRONT_BASE_URL', 'http://localhost:3001', 'Url to the hosted frontend'],
['FRONT_DOMAIN', 'localhost', 'Domain of the hosted frontend'],
['DEFAULT_SUBDOMAIN', 'app', 'The default subdomain name when multiworkspace mode is enabled'],
['SERVER_URL', 'http://localhost:3000', 'Url to the hosted server'],
['PORT', '3000', 'Port'],
['FRONT_PROTOCOL', 'http', 'protocol of the frontend server. Could be `http` or `https`'],
['FRONT_PORT', '3001', 'Port of the frontend server.'],
['PORT', '3000', 'Port of the backend server'],
['CACHE_STORAGE_TYPE', 'redis', 'Cache type (memory, redis...)'],
['CACHE_STORAGE_TTL', '3600 * 24 * 7', 'Cache TTL in seconds']
]}></ArticleTable>
@ -78,7 +81,7 @@ yarn command:prod cron:calendar:ongoing-stale
['AUTH_MICROSOFT_CLIENT_SECRET', '', 'Microsoft client secret'],
['AUTH_MICROSOFT_CALLBACK_URL', 'http://[YourDomain]/auth/microsoft/redirect', 'Microsoft auth callback'],
['AUTH_MICROSOFT_APIS_CALLBACK_URL', 'http://[YourDomain]/auth/microsoft-apis/get-access-token', 'Microsoft APIs auth callback'],
['IS_SIGN_UP_DISABLED', 'false', 'Disable sign-up'],
['IS_MULTIWORKSPACE_ENABLED', 'false', 'Allows the use of multiple workspaces. Requires a web server that can manage wildcards for subdomains.'],
['PASSWORD_RESET_TOKEN_EXPIRES_IN', '5m', 'Password reset token expiration time'],
]}></ArticleTable>

View File

@ -5,7 +5,7 @@ image: /images/user-guide/notes/notes_header.png
---
## General guidelines
## General guidelines
Always make sure to back up your database before starting the upgrade process.
@ -16,10 +16,24 @@ If you used Docker Compose, follow these steps:
2. Upgrade the version by changing the `TAG` value in the .env file near your docker-compose.
3. Bring Twenty back online with `docker-compose up -d`
## Version-specific upgrade steps
### v0.33.0 to v0.34.0
Upgrade your Twenty instance to use v0.34.0 image
```
yarn database:migrate:prod
yarn command:prod upgrade-0.34
```
The `yarn database:migrate:prod` command will apply the migrations to the database structure (core and metadata schemas)
The `yarn command:prod upgrade-0.34` takes care of the data migration of all workspaces.
### v0.32.0 to v0.33.0
Upgrade your Twenty instance to use v0.33.0 image
@ -39,7 +53,7 @@ The `yarn command:prod upgrade-0.33` takes care of the data migration of all wor
Upgrade your Twenty instance to use v0.32.0 image
**Schema and data migration**
**Schema and data migration**
```
yarn database:migrate:prod
yarn command:prod upgrade-0.32
@ -73,7 +87,7 @@ If you are using connected account to synchronize your Google emails and calenda
Upgrade your Twenty instance to use v0.31.0 image
**Schema and data migration**:
**Schema and data migration**:
```
yarn database:migrate:prod
yarn command:prod upgrade-0.31
@ -125,11 +139,11 @@ Upgrade your Twenty instance to use v0.23.0 image
Run the following commands:
```
yarn database:migrate:prod
yarn database:migrate:prod
yarn command:prod upgrade-0.23
```
The `yarn database:migrate:prod` command will apply the migrations to the Database.
The `yarn database:migrate:prod` command will apply the migrations to the Database.
The `yarn command:prod upgrade-0.23` takes care of the data migration, including transferring activities to tasks/notes.
### v0.21.0 to v0.22.0
@ -139,13 +153,13 @@ Upgrade your Twenty instance to use v0.22.0 image
Run the following commands:
```
yarn database:migrate:prod
yarn command:prod workspace:sync-metadata -f
yarn database:migrate:prod
yarn command:prod workspace:sync-metadata -f
yarn command:prod upgrade-0.22
```
The `yarn database:migrate:prod` command will apply the migrations to the Database.
The `yarn command:prod workspace:sync-metadata -f` command will sync the definition of standard objects to the metadata tables and apply to required migrations to existing workspaces.
The `yarn database:migrate:prod` command will apply the migrations to the Database.
The `yarn command:prod workspace:sync-metadata -f` command will sync the definition of standard objects to the metadata tables and apply to required migrations to existing workspaces.
The `yarn command:prod upgrade-0.22` command will apply specific data transformations to adapt to the new object defaultRequestInstrumentationOptions.