Skip to content

Commit 1da6216

Browse files
committed
fix: prefix redis env with ysr
1 parent 8f4e9b9 commit 1da6216

File tree

6 files changed

+8
-15
lines changed

6 files changed

+8
-15
lines changed

.env.docker.template

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# This is a simple configuration to get this running using docker compose.
22

3-
REDIS=redis://redis:6379
3+
YSR_REDIS=redis://redis:6379
44

55
S3_ENDPOINT=minio
66
S3_PORT=9000
77
S3_SSL=false
88
S3_ACCESS_KEY=minioadmin
99
S3_SECRET_KEY=minioadmin
1010

11-
NO_AUTH=true
1211
# YDOC_UPDATE_CALLBACK=http://demo:5173/ydoc
1312

1413
# log everything

.env.template

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Redis endpoint
2-
REDIS=redis://localhost:6379
3-
# REDIS_PREFIX=y # by default "y:" is prepended to all used redis keys
2+
YSR_REDIS=redis://localhost:6379
3+
# YSR_REDIS_PREFIX=y # by default "y:" is prepended to all used redis keys
44

55
### y-redis server component
66
# PORT=3002 # The port that is used for listening for websocket connections
@@ -20,9 +20,6 @@ S3_SECRET_KEY=minioadmin
2020
# POSTGRES=postgres://user:pass@localhost/database
2121
# POSTGRES_TESTDB=yredis_tests ## use a different database for testing
2222

23-
### Skip authentication
24-
# NO_AUTH=true
25-
2623
### Auth signature
2724
## The auth server authenticates web clients using json-web-tokens (jwt).
2825
## They are generated and validated using the following json-web-keys (jwk).

.env.test.template

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Redis endpoint
2-
REDIS=redis://localhost:36379
3-
# REDIS_PREFIX=y # by default "y:" is prepended to all used redis keys
2+
YSR_REDIS=redis://localhost:36379
3+
# YSR_REDIS_PREFIX=y # by default "y:" is prepended to all used redis keys
44

55
### y-redis server component
66
# PORT=3002 # The port that is used for listening for websocket connections
@@ -20,9 +20,6 @@ S3_SECRET_KEY=minioadmin
2020
POSTGRES=postgres://yredis:yredis@localhost:35432/yredis
2121
POSTGRES_TESTDB=yredis_tests ## use a different database for testing
2222

23-
### Skip authentication
24-
# NO_AUTH=true
25-
2623
### Auth signature
2724
## The auth server authenticates web clients using json-web-tokens (jwt).
2825
## They are generated and validated using the following json-web-keys (jwk).

bin/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as env from 'lib0/environment'
55
import * as server from '../src/index.js'
66

77
const port = number.parseInt(env.getConf('port') || '3002')
8-
const redisPrefix = env.getConf('redis-prefix') || 'y'
8+
const redisPrefix = env.getConf('ysr-redis-prefix') || 'y'
99
const postgresUrl = env.getConf('postgres')
1010
const s3Endpoint = env.getConf('s3-endpoint')
1111

bin/worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import * as env from 'lib0/environment'
44
import * as api from '../src/api.js'
55

6-
const redisPrefix = env.getConf('redis-prefix') || 'y'
6+
const redisPrefix = env.getConf('ysr-redis-prefix') || 'y'
77
const postgresUrl = env.getConf('postgres')
88
const s3Endpoint = env.getConf('s3-endpoint')
99

src/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import * as time from 'lib0/time'
1616
const logWorker = logging.createModuleLogger('@y/redis/api/worker')
1717
// const logApi = logging.createModuleLogger('@y/redis/api')
1818

19-
export const redisUrl = env.ensureConf('redis')
19+
export const redisUrl = env.ensureConf('ysr-redis')
2020

2121
let ydocUpdateCallback = env.getConf('ydoc-update-callback')
2222
if (ydocUpdateCallback != null && ydocUpdateCallback.slice(-1) !== '/') {

0 commit comments

Comments
 (0)