mirror of
https://github.com/chillzhuang/SpringBlade.git
synced 2024-11-15 06:59:27 +08:00
194 lines
4.0 KiB
YAML
194 lines
4.0 KiB
YAML
version: '3'
|
|
services:
|
|
consul-server1:
|
|
image: consul:1.3.1
|
|
hostname: "consul-server1"
|
|
volumes:
|
|
- /docker/consul/data1:/consul/data
|
|
command: "agent -server -bootstrap-expect 3 -ui -disable-host-node-id -client 0.0.0.0"
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
blade_net:
|
|
ipv4_address: 172.30.0.51
|
|
|
|
consul-server2:
|
|
image: consul:1.3.1
|
|
depends_on:
|
|
- consul-server1
|
|
hostname: "consul-server2"
|
|
volumes:
|
|
- /docker/consul/data2:/consul/data
|
|
command: "agent -server -ui -join consul-server1 -disable-host-node-id -client 0.0.0.0"
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
blade_net:
|
|
ipv4_address: 172.30.0.52
|
|
|
|
consul-server3:
|
|
image: consul:1.3.1
|
|
depends_on:
|
|
- consul-server1
|
|
hostname: "consul-server3"
|
|
volumes:
|
|
- /docker/consul/data3:/consul/data
|
|
command: "agent -server -ui -join consul-server1 -disable-host-node-id -client 0.0.0.0"
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
blade_net:
|
|
ipv4_address: 172.30.0.53
|
|
|
|
consul-node1:
|
|
image: consul:1.3.1
|
|
depends_on:
|
|
- consul-server1
|
|
hostname: "consul-node1"
|
|
command: "agent -join consul-server1 -disable-host-node-id"
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
- blade_net
|
|
|
|
consul-node2:
|
|
image: consul:1.3.1
|
|
depends_on:
|
|
- consul-server1
|
|
hostname: "consul-node2"
|
|
command: "agent -join consul-server1 -disable-host-node-id"
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
- blade_net
|
|
|
|
consul-nginx:
|
|
image: nginx:stable-alpine-perl
|
|
depends_on:
|
|
- consul-server1
|
|
hostname: "consul-nginx"
|
|
ports:
|
|
- 8500:8500
|
|
- 88:88
|
|
volumes:
|
|
- /docker/nginx/nginx.conf:/etc/nginx/nginx.conf
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
- blade_net
|
|
|
|
blade-redis:
|
|
image: redis:5.0.2-alpine
|
|
hostname: "blade-redis"
|
|
ports:
|
|
- "3379:6379"
|
|
volumes:
|
|
- /docker/redis/data:/data
|
|
command: "redis-server --appendonly yes"
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
- blade_net
|
|
|
|
blade-config-server:
|
|
image: "${REGISTER}/blade-config-server:${TAG}"
|
|
depends_on:
|
|
- consul-server1
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
- blade_net
|
|
|
|
blade-admin:
|
|
image: "${REGISTER}/blade-admin:${TAG}"
|
|
depends_on:
|
|
- blade-config-server
|
|
ports:
|
|
- 7002:7002
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
- blade_net
|
|
|
|
blade-gateway1:
|
|
image: "${REGISTER}/blade-gateway:${TAG}"
|
|
depends_on:
|
|
- blade-config-server
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
blade_net:
|
|
ipv4_address: 172.30.0.81
|
|
|
|
blade-gateway2:
|
|
image: "${REGISTER}/blade-gateway:${TAG}"
|
|
depends_on:
|
|
- blade-config-server
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
blade_net:
|
|
ipv4_address: 172.30.0.82
|
|
|
|
blade-gateway3:
|
|
image: "${REGISTER}/blade-gateway:${TAG}"
|
|
depends_on:
|
|
- blade-config-server
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
blade_net:
|
|
ipv4_address: 172.30.0.83
|
|
|
|
blade-auth:
|
|
image: "${REGISTER}/blade-auth:${TAG}"
|
|
depends_on:
|
|
- blade-config-server
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
- blade_net
|
|
|
|
blade-log:
|
|
image: "${REGISTER}/blade-log:${TAG}"
|
|
depends_on:
|
|
- blade-config-server
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
- blade_net
|
|
|
|
blade-desk:
|
|
image: "${REGISTER}/blade-desk:${TAG}"
|
|
depends_on:
|
|
- blade-config-server
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
- blade_net
|
|
|
|
blade-user:
|
|
image: "${REGISTER}/blade-user:${TAG}"
|
|
depends_on:
|
|
- blade-config-server
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
- blade_net
|
|
|
|
blade-system:
|
|
image: "${REGISTER}/blade-system:${TAG}"
|
|
depends_on:
|
|
- blade-config-server
|
|
privileged: true
|
|
restart: always
|
|
networks:
|
|
- blade_net
|
|
|
|
networks:
|
|
blade_net:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.30.0.0/16
|