A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
feature(worker): Allow configuring redis with a password
MohamedBassemf64a5f3237c4
diff --git a/docs/docs/03-configuration.md b/docs/docs/03-configuration.mdindex 47bd115a..83546ec8 100644--- a/docs/docs/03-configuration.md+++ b/docs/docs/03-configuration.md@@ -10,6 +10,7 @@ The app is mainly configured by environment variables. All the used environment| REDIS_HOST | Yes | localhost | The address of redis used by background jobs || REDIS_PORT | Yes | 6379 | The port of redis used by background jobs || REDIS_DB_IDX | No | Not set | The db idx to use with redis. It defaults to 0 (in the client) so you don't usually need to set it unless you explicitly want another db. |+| REDIS_PASSWORD | No | Not set | The password used for redis authentication. It's not required if your redis instance doesn't require AUTH. || MEILI_ADDR | No | Not set | The address of meilisearch. If not set, Search will be disabled. E.g. (`http://meilisearch:7700`) || MEILI_MASTER_KEY | Only in Prod and if search is enabled | Not set | The master key configured for meilisearch. Not needed in development environment. Generate one with `openssl rand -base64 36` || DISABLE_SIGNUPS | No | false | If enabled, no new signups will be allowed and the signup button will be disabled in the UI |diff --git a/packages/shared/config.ts b/packages/shared/config.tsindex aae14a07..664ad7d9 100644--- a/packages/shared/config.ts+++ b/packages/shared/config.ts@@ -18,6 +18,7 @@ const allEnv = z.object({REDIS_HOST: z.string().default("localhost"),REDIS_PORT: z.coerce.number().default(6379),REDIS_DB_IDX: z.coerce.number().optional(),+ REDIS_PASSWORD: z.string().optional(),CRAWLER_HEADLESS_BROWSER: stringBool("true"),BROWSER_WEB_URL: z.string().url().optional(),CRAWLER_JOB_TIMEOUT_SEC: z.coerce.number().default(60),@@ -58,6 +59,7 @@ const serverConfigSchema = allEnv.transform((val) => {redisHost: val.REDIS_HOST,redisPort: val.REDIS_PORT,redisDBIdx: val.REDIS_DB_IDX,+ redisPassword: val.REDIS_PASSWORD,},crawler: {numWorkers: val.CRAWLER_NUM_WORKERS,diff --git a/packages/shared/queues.ts b/packages/shared/queues.tsindex 6ea89f5e..86ca32c5 100644--- a/packages/shared/queues.ts+++ b/packages/shared/queues.ts@@ -7,6 +7,7 @@ export const queueConnectionDetails = {host: serverConfig.bullMQ.redisHost,port: serverConfig.bullMQ.redisPort,db: serverConfig.bullMQ.redisDBIdx,+ password: serverConfig.bullMQ.redisPassword,};// Link Crawler