加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose-db.yml 2.93 KB
一键复制 编辑 原始数据 按行查看 历史
white 提交于 2024-07-15 18:00 . 部署步骤
version: '3'
services:
jvs-mysql:
image: registry.cn-hangzhou.aliyuncs.com/rkqf/mysql:8.0.32
container_name: jvs-mysql
volumes:
- ./data/mysql/:/var/lib/mysql
- ./data/mysqlcnf/my.cnf:/etc/mysql/my.cnf
- ./mysql:/docker-entrypoint-initdb.d # 初始化数据
# 挂载配置文件目录
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_ROOT_HOST=%
- TZ=Asia/Shanghai
ports:
- "3306:3306"
restart: always
jvs-nacos:
image: ${dockerName}/nacos-server:v2.2.0
container_name: jvs-nacos
environment:
- MODE=standalone
- MYSQL_SERVICE_DB_NAME=nacos
- MYSQL_SERVICE_HOST=jvs-mysql
- MYSQL_SERVICE_PASSWORD=root
- MYSQL_SERVICE_PORT=3306
- MYSQL_SERVICE_USER=root
- NACOS_APPLICATION_PORT=8848
- PREFER_HOST_MODE=hostname
- SPRING_DATASOURCE_PLATFORM=mysql
- MYSQL_SERVICE_DB_PARAM=characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true
restart: always
ports:
- "8848:8848"
- "9848:9848"
- "9849:9849"
depends_on:
- jvs-mysql
#文件服务器需要
jvs-minio:
image: ${dockerName}/minio:RELEASE.2022-06-11T19-55-32Z.fips
container_name: jvs-minio
restart: always
environment:
- MINIO_ROOT_USER=miniominio
- MINIO_ROOT_PASSWORD=miniominio
- TZ=Asia/Shanghai
volumes:
- ./data/minio/:/data
ports:
- 9000:9000
- 9001:9001
command: server /data --console-address ':9001'
#缓存 需要解决问题的 https://www.likecs.com/show-307101123.html
jvs-redis:
container_name: jvs-redis
image: registry.cn-hangzhou.aliyuncs.com/rkqf/redis:6.0
restart: always
privileged: true
# 多个命令同时执行
command:
- /bin/bash
- -c
- |
echo 551 > /proc/sys/net/core/somaxconn
redis-server --requirepass "redis"
volumes:
- ./data/redis/:/data
ports:
- 6379:6379
#文件存储
rabbitmq:
container_name: rabbitmq
image: ${dockerName}/jvs-rabbitmq:management
restart: always
environment:
- TZ=Asia/Shanghai
- RABBITMQ_DEFAULT_USER=jvs
- RABBITMQ_DEFAULT_PASS=jvs
- RABBITMQ_DEFAULT_VHOST=/jvs
volumes:
- ./data/rabbitmq/:/var/lib/rabbitmq
ports:
- 5672:5672
- 15672:15672
#mongo
jvs-mongo:
container_name: jvs-mongo
image: ${dockerName}/mongo:latest
restart: always
environment:
- TZ=Asia/Shanghai
- MONGO_INITDB_DATABASE=jvs-data
- MONGO_INITDB_ROOT_USERNAME=jvs
- MONGO_INITDB_ROOT_PASSWORD=jvs
volumes:
- ./data/mongoconf/:/data/conf
- ./data/mongoconf/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
- ./data/mongo/:/data/db
- ./data/mongolog:/data/log
ports:
- 27017:27017
#桥接网络
networks:
proxy:
ipam:
config:
- subnet: 10.0.0.1/24
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化