version: '3' services: redis1: restart: always image: redis:4 container_name: redis1 ports: - "6371:6371/tcp" - "16371:16371/tcp" environment: TZ: Asia/Shanghai volumes: - /etc/localtime:/etc/localtime - /etc/timezone:/etc/timezone - ./conf/redis1/redis.conf:/redis/redis.conf - ./data/redis1:/data command: redis-server /redis/redis.conf deploy: resources: limits: cpus: '1.00' memory: 512M redis2: restart: always image: redis:4 container_name: redis2 ports: - "6372:6372/tcp" - "16372:16372/tcp" environment: TZ: Asia/Shanghai volumes: - /etc/localtime:/etc/localtime - /etc/timezone:/etc/timezone - ./conf/redis2/redis.conf:/redis/redis.conf - ./data/redis2:/data command: redis-server /redis/redis.conf deploy: resources: limits: cpus: '1.00' memory: 512M redis3: restart: always image: redis:4 container_name: redis3 ports: - "6373:6373/tcp" - "16373:16373/tcp" environment: TZ: Asia/Shanghai volumes: - /etc/localtime:/etc/localtime - /etc/timezone:/etc/timezone - ./conf/redis3/redis.conf:/redis/redis.conf - ./data/redis3:/data command: redis-server /redis/redis.conf deploy: resources: limits: cpus: '1.00' memory: 512M redis4: restart: always image: redis:4 container_name: redis4 ports: - "6374:6374/tcp" - "16374:16374/tcp" environment: TZ: Asia/Shanghai volumes: - /etc/localtime:/etc/localtime - /etc/timezone:/etc/timezone - ./conf/redis4/redis.conf:/redis/redis.conf - ./data/redis4:/data command: redis-server /redis/redis.conf deploy: resources: limits: cpus: '1.00' memory: 512M redis5: restart: always image: redis:4 container_name: redis5 ports: - "6375:6375/tcp" - "16375:16375/tcp" environment: TZ: Asia/Shanghai volumes: - /etc/localtime:/etc/localtime - /etc/timezone:/etc/timezone - ./conf/redis5/redis.conf:/redis/redis.conf - ./data/redis5:/data command: redis-server /redis/redis.conf deploy: resources: limits: cpus: '1.00' memory: 512M redis6: restart: always image: redis:4 container_name: redis6 ports: - "6376:6376/tcp" - "16376:16376/tcp" environment: TZ: Asia/Shanghai volumes: - /etc/localtime:/etc/localtime - /etc/timezone:/etc/timezone - ./conf/redis6/redis.conf:/redis/redis.conf - ./data/redis6:/data command: redis-server /redis/redis.conf deploy: resources: limits: cpus: '1.00' memory: 512M