30 lines
609 B
YAML
Executable File
30 lines
609 B
YAML
Executable File
services:
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: redis
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}", "--appendonly", "yes"]
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- ./data:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
networks:
|
|
- trim-default
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 2G
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "50m"
|
|
max-file: "3"
|
|
|
|
networks:
|
|
trim-default:
|
|
external: true
|