- portainer
version: "3"
services:
portainer:
image: portainer/portainer:latest
container_name: portainer
ports:
- "8001:9000"
volumes:
- /home/portainer/data:/data
- /var/run/docker.sock:/var/run/docker.sock
- mysql
version: '3'
services:
mysql:
image: mysql:5.7.28
restart: always
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: BKS@123456
TZ: Asia/Shanghai
ports:
- 3306:3306
volumes:
- /home/common/mysql/data:/var/lib/mysql
- /home/common/mysql/config/my.cnf:/etc/mysql/my.cnf
command:
--max_connections=1000
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--default-authentication-plugin=mysql_native_password
- rabbitMQ
version: '3'
services:
rabbitmq:
image: rabbitmq:3.8-management # 使用带有管理插件的RabbitMQ镜像
hostname: rabbit
container_name: my_rabbitmq # 容器名称
volumes:
- ./data:/var/lib/rabbitmq # 挂载数据存储目录
ports:
- "5672:5672" # 映射容器内端口到宿主机
- "15672:15672"
environment:
- RABBITMQ_DEFAULT_USER=guest # 设置管理员账号和密码
- RABBITMQ_DEFAULT_PASS=guest
文章来源地址https://www.toymoban.com/news/detail-530504.html
文章来源:https://www.toymoban.com/news/detail-530504.html
到了这里,关于docker-compose安装脚本的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!