docker-stacks/redis/docker-compose.yml
Alexey Skobkin 365d8646e4 Webhook.site stack and Redis persistence (#85)
Co-authored-by: Alexey Skobkin <skobkin-ru@ya.ru>
Reviewed-on: #85
2024-03-07 13:40:37 +00:00

20 lines
525 B
YAML

version: '3.8'
services:
redis:
# https://hub.docker.com/_/redis
image: redis:alpine
container_name: redis
command: "redis-server --save ${PERSISTENCE_PERIOD_SEC:-60} ${PERSISTENCE_MIN_OPS:-1} --loglevel ${LOG_LEVEL:-warning}"
volumes:
- "${HOST_DATA_DIR:-./data}:/data"
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}"