kicc docker云部署
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
934 B

# PROJECT: 康来生物有限公司kicc(智慧冷链)分布式架构平台
# VERSION: 1.0.0
# Author: 康来生物科技有限公司-王翔
# https://support.websoft9.com/docs/docker/zh/solution-compose.html#command
# 初次启动redis,会有一个警告this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf
# 解决办法:vim /etc/sysctl.conf 在sysctl.conf中加入vm.overcommit_memory = 1 , sysctl -p查看是否设置成功
version: '3'
services:
# redis服务器
redis:
image: redis:6.2.6
container_name: redis
hostname: redis
restart: always
ports:
- 6379:6379
command: redis-server --requirepass kanglai@2022
volumes:
- redis:/data
- /usr/software/dockerDatabase/redis/redis.conf:/usr/local/etc/redis/redis.conf
logging:
driver: json-file
options:
max-size: "50m"
max-file: "10"
# 配置卷
volumes:
redis:
driver: local