2024-03-07 13:40:37 +00:00
|
|
|
version: '3.8'
|
2020-07-05 01:35:59 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
redis:
|
2022-03-14 00:32:45 +00:00
|
|
|
# https://hub.docker.com/_/redis
|
2020-07-05 01:35:59 +00:00
|
|
|
image: redis:alpine
|
|
|
|
container_name: redis
|
2024-03-07 13:40:37 +00:00
|
|
|
command: "redis-server --save ${PERSISTENCE_PERIOD_SEC:-60} ${PERSISTENCE_MIN_OPS:-1} --loglevel ${LOG_LEVEL:-warning}"
|
|
|
|
volumes:
|
|
|
|
- "${HOST_DATA_DIR:-./data}:/data"
|
2020-07-05 01:35:59 +00:00
|
|
|
ports:
|
|
|
|
- "127.0.0.1:6379:6379/tcp"
|
|
|
|
env_file: .env
|
|
|
|
restart: unless-stopped
|
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "${LOG_MAX_SIZE:-5m}"
|
|
|
|
max-file: "${LOG_MAX_FILE:-5}"
|