fix(infra): require a password on the Redis container
Redis had no auth, defended only by not being port-mapped to the host. Defense-in-depth per the audit — REDIS_PASSWORD is generated server-side in docker/.env (not committed) and threaded through to both the redis service's --requirepass and the app's REDIS_URL.
This commit is contained in:
1 parent
b4a49f8ed3
commit
ebc5267f35
1 file changed
+2
-2
@@ -5,7 +5,7 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
command: redis-server --appendonly yes
|
||||
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}
|
||||
|
||||
pawfeed:
|
||||
build:
|
||||
@@ -26,7 +26,7 @@ services:
|
||||
- .env
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
REDIS_URL: redis://redis:6379
|
||||
REDIS_URL: redis://:${REDIS_PASSWORD}@redis:6379
|
||||
depends_on:
|
||||
- redis
|
||||
|
||||
|
||||
Reference in new issue
Block a user