-
-
Notifications
You must be signed in to change notification settings - Fork 118
Redis with password is not working #95
Copy link
Copy link
Open
Description
I'm trying to deploy leantime with Redis (password protected) but I keep getting the error NOAUTH Authentication required.
in .env
...
LEAN_USE_REDIS = true
# LEAN_REDIS_URL = 'tcp://redis:6379?database=0'
LEAN_REDIS_URL = 'tcp://default:compl3xpass!@redis:6379?database=0'
docker-compose.yml
version: '3.3'
services:
leantime_db:
image: mysql:8.4
container_name: mysql_leantime
volumes:
- db_data:/var/lib/mysql
restart: unless-stopped
env_file: ./.env # Environment file with settings
networks:
- leantime-net
command: --character-set-server=UTF8MB4 --collation-server=UTF8MB4_unicode_ci
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 30s
timeout: 10s
retries: 3
leantime:
image: leantime/leantime:${LEAN_VERSION:-latest}
restart: unless-stopped
env_file: ./.env # Environment file with settings
# Add security options
security_opt:
- no-new-privileges:true
# Add capabilities
cap_add:
# - CAP_NET_BIND_SERVICE
- CAP_CHOWN
- CAP_SETGID
- CAP_SETUID
ports:
- "${LEAN_PORT:-8080}:8080"
networks:
- leantime-net
volumes:
- public_userfiles:/var/www/html/public/userfiles # Volume to store public files, logo etc
- userfiles:/var/www/html/userfiles # Original volume name for compatibility
- plugins:/var/www/html/app/Plugins # Plugin storage
- logs:/var/www/html/storage/logs # Log storage
depends_on:
leantime_db:
condition: service_healthy
redis:
condition: service_healthy
# Add Redis service for caching
redis:
image: redis:7-alpine
container_name: leantime_redis
restart: unless-stopped
# command: redis-server
command: redis-server --requirepass compl3xpass!
networks:
- leantime-net
volumes:
- redis_data:/data
healthcheck:
# test: ["CMD", "redis-cli", "ping"]
test: ["CMD", "redis-cli", "-a", "compl3xpass!", "ping"]
interval: 30s
timeout: 10s
retries: 3
# Add a helper container for volume permissions
# Run via docker compose --profile mysql_helper up -d
mysql_helper:
image: mysql:8.4
command: chown -R mysql:mysql /var/lib/mysql
volumes:
- db_data:/var/lib/mysql
user: root
profiles: [ "helper" ]
volumes:
db_data:
userfiles: # New volume for public files
public_userfiles:
plugins:
logs:
redis_data: # Redis data volume
networks:
leantime-net:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels