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.

108 lines
2.4 KiB

2 weeks ago
version: "3.8"
services:
springboot:
build:
context: .
dockerfile: Dockerfile
container_name: springboot
depends_on:
- sentinel1
networks:
redisnet:
ipv4_address: 172.23.0.10
ports:
- "8060:8060"
2 weeks ago
redis1:
image: redis:alpine
container_name: redis1
ports:
- "26379:6379"
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./redis/redis1.conf:/usr/local/etc/redis/redis.conf
networks:
redisnet:
ipv4_address: 172.23.0.4
redis2:
image: redis:alpine
container_name: redis2
ports:
- "36379:6379"
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./redis/redis2.conf:/usr/local/etc/redis/redis.conf
networks:
redisnet:
ipv4_address: 172.23.0.5
redis3:
image: redis:alpine
container_name: redis3
ports:
- "46379:6379"
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./redis/redis3.conf:/usr/local/etc/redis/redis.conf
networks:
redisnet:
ipv4_address: 172.23.0.6
sentinel1:
image: redis:alpine
container_name: sentinel1
depends_on:
- redis1
ports:
- "26380:26379"
command: redis-sentinel /usr/local/etc/sentinel/sentinel.conf
volumes:
- ./sentinel1:/usr/local/etc/sentinel
extra_hosts:
- "redis1:172.23.0.4"
- "redis2:172.23.0.5"
- "redis3:172.23.0.6"
networks:
redisnet:
ipv4_address: 172.23.0.7
2 weeks ago
sentinel2:
image: redis:alpine
container_name: sentinel2
depends_on:
- redis1
ports:
- "26381:26379"
command: redis-sentinel /usr/local/etc/sentinel/sentinel.conf
volumes:
- ./sentinel2:/usr/local/etc/sentinel
extra_hosts:
- "redis1:172.23.0.4"
- "redis2:172.23.0.5"
- "redis3:172.23.0.6"
networks:
redisnet:
ipv4_address: 172.23.0.8
2 weeks ago
sentinel3:
image: redis:alpine
container_name: sentinel3
depends_on:
- redis1
ports:
- "26382:26379"
command: redis-sentinel /usr/local/etc/sentinel/sentinel.conf
volumes:
- ./sentinel3:/usr/local/etc/sentinel
extra_hosts:
- "redis1:172.23.0.4"
- "redis2:172.23.0.5"
- "redis3:172.23.0.6"
networks:
redisnet:
ipv4_address: 172.23.0.9
2 weeks ago
networks:
redisnet:
driver: bridge
ipam:
config:
- subnet: 172.23.0.0/16