加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose 2.yml 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
xman 提交于 2021-04-12 01:18 . no message
version: '3'
#docker network create my_net_work
networks:
custom_net:
external:
name: my_net_work
services:
web:
container_name: web
image: xman2020/web:1.1
ports:
- "80:80"
depends_on:
- redis
- mysql
- rabbitmq
networks:
- custom_net
volumes:
- /E/wwwroot/:/var/www/html
- ./nginx:/etc/nginx
privileged: true
restart: always
golang:
container_name: go
image: golang:latest
ports:
- "8088:8088"
networks:
- custom_net
depends_on:
- redis
- mysql
volumes:
- /E/gowork:/go
tty: true
restart: always
environment:
GO111MODULE: "on"
GOPROXY: "https://mirrors.aliyun.com/goproxy,direct"
redis:
container_name: redis
image: redis:latest
command: redis-server --requirepass 123456
ports:
- "6378:6379"
networks:
- custom_net
privileged: true
restart: always
rabbitmq:
container_name: rabbitmq
image: rabbitmq:management
volumes:
- ./rabbitmq/data:/data
ports:
- "15672:15672"
- "5672:5672"
networks:
- custom_net
privileged: true
restart: always
environment:
RABBITMQ_DEFAULT_VHOST: "tp5.cc"
RABBITMQ_DEFAULT_USER: "admin"
RABBITMQ_DEFAULT_PASS: "123456"
mysql:
container_name: mysql
image: mysql:5.7
privileged: true
restart: always
ports:
- "3305:3306"
volumes:
- ./mysql/conf:/etc/mysql
- ./mysql/logs:/var/log/mysql
- ./mysql/data:/var/lib/mysql
networks:
- custom_net
environment:
MYSQL_ROOT_PASSWORD: "123456"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化