2023-10-20 11:44:43 +08:00
|
|
|
version: '3.9'
|
|
|
|
name: y9-dev-environments
|
|
|
|
services:
|
|
|
|
db:
|
|
|
|
image: mysql:latest
|
|
|
|
container_name: mysql01
|
|
|
|
restart: always
|
|
|
|
extra_hosts:
|
|
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
networks:
|
|
|
|
- y9-share-net
|
|
|
|
ports:
|
|
|
|
- "3306:3306"
|
|
|
|
command: --default-authentication-plugin=caching_sha2_password
|
|
|
|
environment:
|
|
|
|
MYSQL_ROOT_PASSWORD: '12345678'
|
|
|
|
MYSQL_DATABASE: 'y9_public'
|
|
|
|
volumes:
|
|
|
|
- d:/docker-data/mysql:/var/lib/mysql
|
|
|
|
- d:/docker-config/mysql-init:/docker-entrypoint-initdb.d
|
|
|
|
healthcheck:
|
|
|
|
#test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
|
|
|
|
test: "mysql --user=root --password=12345678 --execute='show databases;'"
|
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 8
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis:latest
|
|
|
|
container_name: redis01
|
|
|
|
restart: always
|
|
|
|
extra_hosts:
|
|
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
networks:
|
|
|
|
- y9-share-net
|
|
|
|
ports:
|
|
|
|
- "6379:6379"
|
|
|
|
command: redis-server --requirepass "12345678"
|
|
|
|
volumes:
|
|
|
|
- d:/docker-data/redis:/data
|
2023-11-01 21:26:54 +08:00
|
|
|
|
2023-10-23 10:00:00 +08:00
|
|
|
consul:
|
|
|
|
image: docker.io/bitnami/consul:latest
|
|
|
|
container_name: consul01
|
|
|
|
restart: always
|
|
|
|
extra_hosts:
|
|
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
networks:
|
|
|
|
- y9-share-net
|
2023-10-24 19:42:29 +08:00
|
|
|
environment:
|
|
|
|
- CONSUL_AGENT_MODE=server
|
|
|
|
- CONSUL_BOOTSTRAP_EXPECT=1
|
|
|
|
- CONSUL_ENABLE_UI=true
|
|
|
|
- CONSUL_HTTP_PORT_NUMBER=8500
|
2023-10-23 10:00:00 +08:00
|
|
|
ports:
|
|
|
|
- '8500:8500'
|
2023-10-24 19:42:29 +08:00
|
|
|
volumes:
|
|
|
|
- d:/docker-data/consul:/bitnami/consul
|
2023-11-01 21:26:54 +08:00
|
|
|
|
|
|
|
elasticsearch:
|
2023-11-14 19:42:32 +08:00
|
|
|
image: elasticsearch:8.11.0
|
2023-11-01 21:26:54 +08:00
|
|
|
container_name: elastic01
|
|
|
|
restart: always
|
|
|
|
extra_hosts:
|
|
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
networks:
|
|
|
|
- y9-share-net
|
|
|
|
ports:
|
|
|
|
- '9200:9200'
|
|
|
|
- '9300:9300'
|
|
|
|
volumes:
|
|
|
|
- d:/docker-data/es:/usr/share/elasticsearch/data
|
|
|
|
environment:
|
|
|
|
- discovery.type=single-node
|
|
|
|
- xpack.security.enabled=false
|
|
|
|
labels:
|
|
|
|
org.springframework.boot.service-connection: elasticsearch
|
|
|
|
|
|
|
|
kafka:
|
|
|
|
image: bitnami/kafka:latest
|
|
|
|
container_name: kafka01
|
|
|
|
restart: always
|
|
|
|
extra_hosts:
|
|
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
networks:
|
|
|
|
- y9-share-net
|
|
|
|
ports:
|
2023-11-27 10:55:54 +08:00
|
|
|
#- "9092:9092"
|
2023-11-01 21:26:54 +08:00
|
|
|
- "9094:9094"
|
|
|
|
environment:
|
|
|
|
- KAFKA_CFG_NODE_ID=0
|
|
|
|
- KAFKA_CFG_PROCESS_ROLES=controller,broker
|
|
|
|
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://0.0.0.0:9094
|
|
|
|
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094
|
|
|
|
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
|
|
|
|
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
|
|
|
|
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka:9093
|
|
|
|
volumes:
|
|
|
|
- d:/docker-data/kafka:/bitnami/kafka
|
|
|
|
|
2023-10-20 11:44:43 +08:00
|
|
|
networks:
|
|
|
|
y9-share-net:
|
2023-11-01 21:26:54 +08:00
|
|
|
external: true
|