0%
Intro
使用Docker部署Redis
Compose
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| version: '3.1'
services: redis: image: redis container_name: redis restart: always ports: - 6379:6379 volumes: - ./data:/data - ./conf/redis.conf:/etc/redis/redis.conf command: /bin/bash -c "redis-server /etc/redis/redis.conf"
|
坑
redis.conf
1 2 3 4 5
| bind * -::*
requirepass yourpassword protected-mode no daemonize no
|
bind
必须改成*
才可以远程访问