docker-stacks/redis/docker-compose.yml

20 lines
525 B
YAML
Raw Permalink Normal View History

version: '3.8'
2020-07-05 01:35:59 +00:00
services:
redis:
# https://hub.docker.com/_/redis
2020-07-05 01:35:59 +00:00
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"
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}"