diff --git a/docker/deploy.sh b/docker/deploy.sh index 79fb9ae5b..28822ecfd 100644 --- a/docker/deploy.sh +++ b/docker/deploy.sh @@ -22,11 +22,16 @@ port(){ ##放置挂载文件 mount(){ - #挂载配置文件 + #挂载 nginx 配置文件 if test ! -f "/docker/nginx/conf/nginx.conf" ;then mkdir -p /docker/nginx/conf cp nginx/nginx.conf /docker/nginx/conf/nginx.conf fi + #挂载 redis 配置文件 + if test ! -f "/docker/redis/conf/redis.conf" ;then + mkdir -p /docker/redis/conf + cp redis/redis.conf /docker/redis/conf/redis.conf + fi } #启动基础模块 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index baac56a6e..b6e43fad6 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -65,10 +65,10 @@ services: TZ: Asia/Shanghai volumes: # 配置文件 - - /docker/redis/conf/redis.conf:/redis.conf:rw + - /docker/redis/conf:/redis/config:rw # 数据文件 - - /docker/redis/data:/data:rw - command: "redis-server --appendonly yes" + - /docker/redis/data:/redis/data:rw + command: "redis-server /redis/config/redis.conf --appendonly yes" privileged: true restart: always networks: diff --git a/docker/redis/redis.conf b/docker/redis/redis.conf new file mode 100644 index 000000000..213e9ba9e --- /dev/null +++ b/docker/redis/redis.conf @@ -0,0 +1,2 @@ +# redis 密码 +# requirepass 123456 \ No newline at end of file