Can use Redis to store user sessions

This commit is contained in:
2025-12-04 18:11:27 +01:00
parent a2af039759
commit cb739ebe6d
8 changed files with 196 additions and 3 deletions

View File

@@ -1,4 +1,15 @@
services:
redis:
image: redis
network_mode: host
volumes:
- ./redis/redis.conf:/redis.conf:ro
command: [ "redis-server", "/redis.conf" ]
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 30s
retries: 3
upstream:
image: dexidp/dex
user: "1000"
@@ -33,9 +44,14 @@ services:
image: rust
user: "1000"
network_mode: host
depends_on:
redis:
condition: service_healthy
environment:
- STORAGE_PATH=/storage
- DISABLE_LOCAL_LOGIN=true
- USE_REDIS=true
- REDIS_PASSWORD=secretsecret
#- RUST_LOG=debug
volumes:
- ../:/app

View File

@@ -0,0 +1,3 @@
maxmemory 256mb
maxmemory-policy allkeys-lru
requirepass secretsecret