Can use Redis to store user sessions
This commit is contained in:
@@ -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
|
||||
|
||||
3
sample_upstream_provider/redis/redis.conf
Normal file
3
sample_upstream_provider/redis/redis.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
maxmemory 256mb
|
||||
maxmemory-policy allkeys-lru
|
||||
requirepass secretsecret
|
||||
Reference in New Issue
Block a user