安装篇-安装Redis
安装Redis
这里安装是基于docker-compose安装的,docker-compose安装请移步「安装docker和docker-compose」
1、docker-compose.yml
version: '3'
services:
redis:
image: redis:alpine
container_name: redis
volumes:
- /usr/local/docker/redis/data:/data
command: redis-server --requirepass 123456
ports:
- "6379:6379"
restart: always
logging:
driver: "json-file"
options:
max-size: "1m"