1 Star 0 Fork 1

lcq_chang_dev/webook

forked from 人间喜乐/webook 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yaml 2.88 KB
一键复制 编辑 原始数据 按行查看 历史
人间喜乐 提交于 2024-03-16 22:50 . 负载均衡
version: "3"
# 我这个 docker compose 由几个服务组成
services:
mysql8:
image: mysql:8.0.29
restart: always
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
# - 初始化脚本
- ./script/mysql/:/docker-entrypoint-initdb.d/
ports:
# - 外部访问用 13316
- 13316:3306
redis:
image: "bitnami/redis:latest"
restart: always
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '6379:6379'
etcd:
image: 'bitnami/etcd:3.5'
environment:
- ALLOW_NONE_AUTHENTICATION=yes
ports:
# 所以你要用 12379 端口来连接 etcd
- 12379:2379
mongo:
image: mongo:6.0
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
ports:
- 27017:27017
mongo-express:
image: mongo-express:0.54
restart: always
ports:
# - 访问 18081
- 18081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example
# 这个url就是根据 mongo 里面的配置搞出来的
ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/
kafka:
image: 'bitnami/kafka:3.6.0'
ports:
- '9092:9092'
- '9094:9094'
environment:
- KAFKA_CFG_NODE_ID=0
# - 允许自动创建 topic,线上不要开启
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
- KAFKA_CFG_PROCESS_ROLES=controller,broker
- KAFKA_CFG_LISTENERS=PLAINTEXT://0.0.0.0: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_QUORUM_VOTERS=0@kafka:9093
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
prometheus:
image: prom/prometheus:v2.47.2
volumes:
- ./prometheus.yaml:/etc/prometheus/prometheus.yml
ports:
- 9090:9090
zipkin:
# 用的是不支持 Kafka 之类的简化版本
image: openzipkin/zipkin-slim:2.24
ports:
- '9411:9411'
grafana:
image: grafana/grafana-enterprise:10.2.0
ports:
- 3000:3000
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.0
container_name: elasticsearch
environment:
- discovery.type=single-node
- "xpack.security.enabled=false"
- "ES_JAVA_OPTS=-Xms84m -Xmx512m"
ports:
- "9200:9200"
# nacos-standalone:
# image: nacos/nacos-server:latest
# container_name: nacos-standalone
# ports:
# - "8848:8848"
# env_file:
# - ./nacos-standalone.env
# volumes:
# - ./logs/standalone:/home/nacos/logs
# - ./init.d/custom.properties:/home/nacos/init.d/custom.properties
# restart: always
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/lcq_chang_dev/webook.git
git@gitee.com:lcq_chang_dev/webook.git
lcq_chang_dev
webook
webook
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385