Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

Use only redis url for connecting

Hakan Shehu5b87a8097f17
diff --git a/apps/server/src/lib/configuration.ts b/apps/server/src/lib/configuration.ts
index cb46e337..1e5f99d7 100644
--- a/apps/server/src/lib/configuration.ts
+++ b/apps/server/src/lib/configuration.ts
@@ -33,9 +33,6 @@ export interface PostgresConfiguration {
export interface RedisConfiguration {
url: string;
- host: string;
- port: number;
- password: string;
db: number;
eventsChannel: string;
jobsQueueName: string;
@@ -117,9 +114,6 @@ export const configuration: Configuration = {
},
redis: {
url: getRequiredEnv('REDIS_URL'),
- host: getRequiredEnv('REDIS_HOST'),
- port: parseInt(getOptionalEnv('REDIS_PORT') || '6379'),
- password: getRequiredEnv('REDIS_PASSWORD'),
db: parseInt(getOptionalEnv('REDIS_DB') || '0'),
jobsQueueName: getOptionalEnv('REDIS_JOBS_QUEUE_NAME') || 'jobs',
eventsChannel: getOptionalEnv('REDIS_EVENTS_CHANNEL') || 'events',
diff --git a/apps/server/src/services/job-service.ts b/apps/server/src/services/job-service.ts
index 749d9f58..23eda3c7 100644
--- a/apps/server/src/services/job-service.ts
+++ b/apps/server/src/services/job-service.ts
@@ -15,10 +15,8 @@ class JobService {
this.jobQueue = new Queue(configuration.redis.jobsQueueName, {
connection: {
- host: configuration.redis.host,
- password: configuration.redis.password,
- port: configuration.redis.port,
db: configuration.redis.db,
+ url: configuration.redis.url,
},
defaultJobOptions: {
removeOnComplete: true,
@@ -40,9 +38,7 @@ class JobService {
this.handleJobJob,
{
connection: {
- host: configuration.redis.host,
- password: configuration.redis.password,
- port: configuration.redis.port,
+ url: configuration.redis.url,
db: configuration.redis.db,
},
}
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 6622f59b..c360d958 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -89,9 +89,6 @@ services:
# Redis Configuration
# ───────────────────────────────────────────────────────────────
REDIS_URL: 'redis://:strongredispassword@redis:6379/0'
- REDIS_HOST: 'redis'
- REDIS_PORT: '6379'
- REDIS_PASSWORD: 'strongredispassword'
REDIS_DB: '0'
# Optional variables:
REDIS_JOBS_QUEUE_NAME: 'jobs'