# docker-compose.yml文件的版本
version: "3.7"
# 管理的服务
services:
redis:
restart: always
# 指定镜像
image: redis:5.0.5-alpine
ports:
# 端口映射
- 6379:6379
volumes:
# 目录映射
- "/data/redis:/data/"
command:
# 执行的命令
redis-server --appendonly yes
mysql:
restart: always
image: mysql:5.7.30
volumes:
- "/data/mysql:/var/lib/mysql"
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: root
mongo:
restart: always
image: mongo:4.2
volumes:
- "/data/mongo:/data/db"
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
rabbitmq:
restart: always
image: rabbitmq:3.7-alpine
volumes:
- "/data/rabbitmq:/var/lib/rabbitmq"
ports:
- 5672:5672
- 15672:15672
jaegertracing:
restart: always
image: jaegertracing/all-in-one:latest
ports:
- 5775:5775/udp
- 6831:6831/udp
- 6832:6832/udp
- 5778:5778
- 16686:16686
- 14268:14268
- 9411:9411
environment:
COLLECTOR_ZIPKIN_HTTP_PORT: 9411
网友评论