Files
shell-scripts/中间件部署/基础服务组件-docker-compose/docker-compose.yml
2023-05-15 16:49:09 +08:00

96 lines
2.4 KiB
YAML

version: '3'
services:
mariadb:
image: "mariadb:10.5.5"
ports:
- "3306:3306"
volumes:
- "./mariadb-10.5.5/persistant-data:/var/lib/mysql"
- "./mariadb-10.5.5/initdb-sql:/docker-entrypoint-initdb.d"
environment:
MYSQL_USER: "lishi"
MYSQL_PASSWORD: "Lishi@123456"
MYSQL_ROOT_PASSWORD: "Lishi@123456"
redis:
image: redis:5.0.5
container_name: redis-6379
restart: always
ports:
- "6379:6379"
volumes:
- "./redis-5.0.9/redis-conf/redis-6379.conf:/usr/local/etc/redis/redis.conf"
- "./redis-5.0.9/persit-data:/data"
command: redis-server /usr/local/etc/redis/redis.conf
# nacos:
# hostname: nacos
# image: nacos/nacos-server:1.4.0
# container_name: nacos
# volumes:
# - "./nacos-1.4.0/logs/:/home/nacos/logs"
# - "./nacos-1.4.0/init.d/custom.properties:/home/nacos/init.d/custom.properties"
# ports:
# - "8848:8848"
# - "9555:9555"
# env_file:
# - "./nacos-1.4.0/env/nacos-hostname.env"
# restart: always
# depends_on:
# - mysql
# mysql:
# container_name: mysql
# image: nacos/nacos-mysql:5.7
# env_file:
# - "./nacos-1.4.0/env/mysql.env"
# volumes:
# - "./nacos-1.4.0/mysql-data:/var/lib/mysql"
# ports:
# - "3309:3306"
rabbitmq:
image: rabbitmq:3.6.5
container_name: rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=Lishi@123456
restart: always
ports:
- "15672:15672"
- "5672:5672"
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
mongo:
image: mongo:4.0
container_name: mongodb
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: lishi
MONGO_INITDB_ROOT_PASSWORD: Lishi@123456
ports:
- "27017:27017"
volumes:
- "./mogodb-4.0/persit-data:/data/db"
- "./mogodb-4.0/mongo-entrypoint/:/docker-entrypoint-initdb.d/" #目录下创建docker-entrypoint-initdb.sh初始化数据库脚本
command: mongod
mongo-express:
image: mongo-express
container_name: mongo-express
restart: always
ports:
- 8081:8081
chengdu_emergency:
image: aiboxhb.cdcyy.cn:8033/etour/chengdu-emergency@sha256:af2ec062507bbaaf235a2710a27bdd8fd9189f55e64031d084e98a3aedc08dc0
container_name: chengdu_emergency
restart: always
ports:
- 18888:18888