mirror of
				https://github.com/lingble/twenty.git
				synced 2025-10-30 20:27:55 +00:00 
			
		
		
		
	fix(6423): add username and password for redis connection (#6745)
Co-authored-by: pbb <pierre-bertrand.borel_ext@michelin.com>
This commit is contained in:
		| @@ -52,6 +52,8 @@ SIGN_IN_PREFILLED=true | |||||||
| # MESSAGE_QUEUE_TYPE=pg-boss | # MESSAGE_QUEUE_TYPE=pg-boss | ||||||
| # REDIS_HOST=127.0.0.1 | # REDIS_HOST=127.0.0.1 | ||||||
| # REDIS_PORT=6379 | # REDIS_PORT=6379 | ||||||
|  | # REDIS_USERNAME= | ||||||
|  | # REDIS_PASSWORD= | ||||||
| # DEMO_WORKSPACE_IDS=REPLACE_ME_WITH_A_RANDOM_UUID | # DEMO_WORKSPACE_IDS=REPLACE_ME_WITH_A_RANDOM_UUID | ||||||
| # SERVER_URL=http://localhost:3000 | # SERVER_URL=http://localhost:3000 | ||||||
| # WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION=30 | # WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION=30 | ||||||
|   | |||||||
| @@ -29,12 +29,17 @@ export const cacheStorageModuleFactory = ( | |||||||
|         ); |         ); | ||||||
|       } |       } | ||||||
|  |  | ||||||
|  |       const username = environmentService.get('REDIS_USERNAME'); | ||||||
|  |       const password = environmentService.get('REDIS_PASSWORD'); | ||||||
|  |  | ||||||
|       return { |       return { | ||||||
|         ...cacheModuleOptions, |         ...cacheModuleOptions, | ||||||
|         store: redisStore, |         store: redisStore, | ||||||
|         socket: { |         socket: { | ||||||
|           host, |           host, | ||||||
|           port, |           port, | ||||||
|  |           username, | ||||||
|  |           password, | ||||||
|         }, |         }, | ||||||
|       }; |       }; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -368,6 +368,10 @@ export class EnvironmentVariables { | |||||||
|   @CastToPositiveNumber() |   @CastToPositiveNumber() | ||||||
|   REDIS_PORT = 6379; |   REDIS_PORT = 6379; | ||||||
|  |  | ||||||
|  |   REDIS_USERNAME: string; | ||||||
|  |  | ||||||
|  |   REDIS_PASSWORD: string; | ||||||
|  |  | ||||||
|   API_TOKEN_EXPIRES_IN = '100y'; |   API_TOKEN_EXPIRES_IN = '100y'; | ||||||
|  |  | ||||||
|   SHORT_TERM_TOKEN_EXPIRES_IN = '5m'; |   SHORT_TERM_TOKEN_EXPIRES_IN = '5m'; | ||||||
|   | |||||||
| @@ -34,6 +34,8 @@ export const messageQueueModuleFactory = async ( | |||||||
|     case MessageQueueDriverType.BullMQ: { |     case MessageQueueDriverType.BullMQ: { | ||||||
|       const host = environmentService.get('REDIS_HOST'); |       const host = environmentService.get('REDIS_HOST'); | ||||||
|       const port = environmentService.get('REDIS_PORT'); |       const port = environmentService.get('REDIS_PORT'); | ||||||
|  |       const username = environmentService.get('REDIS_USERNAME'); | ||||||
|  |       const password = environmentService.get('REDIS_PASSWORD'); | ||||||
|  |  | ||||||
|       return { |       return { | ||||||
|         type: MessageQueueDriverType.BullMQ, |         type: MessageQueueDriverType.BullMQ, | ||||||
| @@ -41,6 +43,8 @@ export const messageQueueModuleFactory = async ( | |||||||
|           connection: { |           connection: { | ||||||
|             host, |             host, | ||||||
|             port, |             port, | ||||||
|  |             username, | ||||||
|  |             password, | ||||||
|           }, |           }, | ||||||
|         }, |         }, | ||||||
|       }; |       }; | ||||||
|   | |||||||
| @@ -36,6 +36,8 @@ yarn command:prod cron:calendar:calendar-event-list-fetch | |||||||
|     ['PG_SSL_ALLOW_SELF_SIGNED', 'false', 'Allow self signed certificates'], |     ['PG_SSL_ALLOW_SELF_SIGNED', 'false', 'Allow self signed certificates'], | ||||||
|     ['REDIS_HOST', '127.0.0.1', 'Redis connection host'], |     ['REDIS_HOST', '127.0.0.1', 'Redis connection host'], | ||||||
|     ['REDIS_PORT', '6379', 'Redis connection port'], |     ['REDIS_PORT', '6379', 'Redis connection port'], | ||||||
|  |     ['REDIS_USERNAME', 'redis_username', 'Redis connection username'], | ||||||
|  |     ['REDIS_PASSWORD', 'redis_pwd', 'Redis connection password'], | ||||||
|     ['FRONT_BASE_URL', 'http://localhost:3001', 'Url to the hosted frontend'], |     ['FRONT_BASE_URL', 'http://localhost:3001', 'Url to the hosted frontend'], | ||||||
|     ['SERVER_URL', 'http://localhost:3000', 'Url to the hosted server'], |     ['SERVER_URL', 'http://localhost:3000', 'Url to the hosted server'], | ||||||
|     ['PORT', '3000', 'Port'], |     ['PORT', '3000', 'Port'], | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 PB Borel
					PB Borel