Skip to content

Commit 08e3347

Browse files
charlesBochetharshit078
authored andcommitted
Add 0.30 release notes (twentyhq#7300)
In this PR: - update your environment variables to default `CACHE_STORAGE_TYPE` to `redis` and `MESSAGE_QUEUE_TYPE` to `bull-mq` - add redis container to our default docker-compose - add `REDIS_HOST` and `REDIS_PORT` to docker-compose yaml - add upgrade instructions
1 parent f344b9a commit 08e3347

File tree

10 files changed

+45
-13
lines changed

10 files changed

+45
-13
lines changed

packages/twenty-docker/.env.example

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ TAG=latest
55
PG_DATABASE_HOST=db:5432
66

77
SERVER_URL=http://localhost:3000
8+
# REDIS_HOST=redis
9+
# REDIS_PORT=6379
810

911
# Use openssl rand -base64 32 for each secret
1012
# ACCESS_TOKEN_SECRET=replace_me_with_a_random_string_access
@@ -19,5 +21,3 @@ STORAGE_TYPE=local
1921
# STORAGE_S3_REGION=eu-west3
2022
# STORAGE_S3_NAME=my-bucket
2123
# STORAGE_S3_ENDPOINT=
22-
23-
MESSAGE_QUEUE_TYPE=pg-boss

packages/twenty-docker/docker-compose.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ services:
2525
PG_DATABASE_URL: postgres://twenty:twenty@${PG_DATABASE_HOST}/default
2626
SERVER_URL: ${SERVER_URL}
2727
FRONT_BASE_URL: ${FRONT_BASE_URL:-$SERVER_URL}
28-
MESSAGE_QUEUE_TYPE: ${MESSAGE_QUEUE_TYPE}
28+
REDIS_PORT: ${REDIS_PORT:-6379}
29+
REDIS_HOST: ${REDIS_HOST:-redis}
2930

3031
ENABLE_DB_MIGRATIONS: "true"
3132

@@ -34,6 +35,7 @@ services:
3435
STORAGE_S3_REGION: ${STORAGE_S3_REGION}
3536
STORAGE_S3_NAME: ${STORAGE_S3_NAME}
3637
STORAGE_S3_ENDPOINT: ${STORAGE_S3_ENDPOINT}
38+
3739
ACCESS_TOKEN_SECRET: ${ACCESS_TOKEN_SECRET}
3840
LOGIN_TOKEN_SECRET: ${LOGIN_TOKEN_SECRET}
3941
REFRESH_TOKEN_SECRET: ${REFRESH_TOKEN_SECRET}
@@ -57,14 +59,16 @@ services:
5759
PG_DATABASE_URL: postgres://twenty:twenty@${PG_DATABASE_HOST}/default
5860
SERVER_URL: ${SERVER_URL}
5961
FRONT_BASE_URL: ${FRONT_BASE_URL:-$SERVER_URL}
60-
MESSAGE_QUEUE_TYPE: ${MESSAGE_QUEUE_TYPE}
62+
REDIS_PORT: ${REDIS_PORT:-6379}
63+
REDIS_HOST: ${REDIS_HOST:-redis}
6164

6265
ENABLE_DB_MIGRATIONS: "false" # it already runs on the server
6366

6467
STORAGE_TYPE: ${STORAGE_TYPE}
6568
STORAGE_S3_REGION: ${STORAGE_S3_REGION}
6669
STORAGE_S3_NAME: ${STORAGE_S3_NAME}
6770
STORAGE_S3_ENDPOINT: ${STORAGE_S3_ENDPOINT}
71+
6872
ACCESS_TOKEN_SECRET: ${ACCESS_TOKEN_SECRET}
6973
LOGIN_TOKEN_SECRET: ${LOGIN_TOKEN_SECRET}
7074
REFRESH_TOKEN_SECRET: ${REFRESH_TOKEN_SECRET}
@@ -89,6 +93,12 @@ services:
8993
retries: 10
9094
restart: always
9195

96+
redis:
97+
image: redis
98+
ports:
99+
- "6379:6379"
100+
restart: always
101+
92102
volumes:
93103
docker-data:
94104
db-data:

packages/twenty-emails/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twenty-emails",
3-
"version": "0.24.2",
3+
"version": "0.30.0",
44
"description": "",
55
"author": "",
66
"private": true,

packages/twenty-front/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twenty-front",
3-
"version": "0.24.2",
3+
"version": "0.30.0",
44
"private": true,
55
"type": "module",
66
"scripts": {

packages/twenty-server/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twenty-server",
3-
"version": "0.24.2",
3+
"version": "0.30.0",
44
"description": "",
55
"author": "",
66
"private": true,

packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ export class EnvironmentVariables {
391391
@CastToBoolean()
392392
MESSAGING_PROVIDER_GMAIL_ENABLED = false;
393393

394-
MESSAGE_QUEUE_TYPE: string = MessageQueueDriverType.Sync;
394+
MESSAGE_QUEUE_TYPE: string = MessageQueueDriverType.BullMQ;
395395

396396
EMAIL_FROM_ADDRESS = '[email protected]';
397397

@@ -426,7 +426,7 @@ export class EnvironmentVariables {
426426
@CastToPositiveNumber()
427427
API_RATE_LIMITING_LIMIT = 500;
428428

429-
CACHE_STORAGE_TYPE: CacheStorageType = CacheStorageType.Memory;
429+
CACHE_STORAGE_TYPE: CacheStorageType = CacheStorageType.Redis;
430430

431431
@CastToPositiveNumber()
432432
CACHE_STORAGE_TTL: number = 3600 * 24 * 7;

packages/twenty-ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twenty-ui",
3-
"version": "0.24.2",
3+
"version": "0.30.0",
44
"type": "module",
55
"main": "./src/index.ts",
66
"exports": {

packages/twenty-website/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twenty-website",
3-
"version": "0.24.2",
3+
"version": "0.30.0",
44
"private": true,
55
"scripts": {
66
"nx": "NX_DEFAULT_PROJECT=twenty-website node ../../node_modules/nx/bin/nx.js",

packages/twenty-website/src/content/developers/self-hosting/self-hosting-var.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ yarn command:prod cron:calendar:calendar-event-list-fetch
4141
['FRONT_BASE_URL', 'http://localhost:3001', 'Url to the hosted frontend'],
4242
['SERVER_URL', 'http://localhost:3000', 'Url to the hosted server'],
4343
['PORT', '3000', 'Port'],
44-
['CACHE_STORAGE_TYPE', 'memory', 'Cache type (memory, redis...)'],
44+
['CACHE_STORAGE_TYPE', 'redis', 'Cache type (memory, redis...)'],
4545
['CACHE_STORAGE_TTL', '3600 * 24 * 7', 'Cache TTL in seconds']
4646
]}></ArticleTable>
4747

@@ -162,7 +162,7 @@ yarn command:prod cron:calendar:calendar-event-list-fetch
162162
### Message Queue
163163

164164
<ArticleTable options={[
165-
['MESSAGE_QUEUE_TYPE', 'pg-boss', "Queue driver: 'pg-boss' or 'bull-mq'"],
165+
['MESSAGE_QUEUE_TYPE', 'bull-mq', "Queue driver: 'pg-boss' or 'bull-mq'"],
166166
]}></ArticleTable>
167167

168168
### Logging

packages/twenty-website/src/content/developers/self-hosting/upgrade-guide.mdx

+22
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,26 @@ yarn command:prod upgrade-0.24
5858
The `yarn database:migrate:prod` command will apply the migrations to the database structure (core and metadata schemas)
5959
The `yarn command:prod upgrade-0.24` takes care of the data migration of all workspaces.
6060

61+
# v0.24.0 to v0.30.0
62+
63+
Upgrade your Twenty instance to use v0.30.0 image
64+
65+
**Breaking change**:
66+
To enhance performances, Twenty now requires redis cache to be configured. We have updated our [docker-compose.yml](https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-docker/docker-compose.yml) to reflect this.
67+
Make sure to update your configuration and to update your environment variables accordingly:
68+
```
69+
REDIS_HOST={your-redis-host}
70+
REDIS_PORT={your-redis-port}
71+
CACHE_STORAGE_TYPE=redis
72+
```
73+
74+
**Schema and data migration**:
75+
```
76+
yarn database:migrate:prod
77+
yarn command:prod upgrade-0.30
78+
```
79+
80+
The `yarn database:migrate:prod` command will apply the migrations to the database structure (core and metadata schemas)
81+
The `yarn command:prod upgrade-30` takes care of the data migration of all workspaces.
82+
6183
<ArticleEditContent></ArticleEditContent>

0 commit comments

Comments
 (0)