加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yml 1.58 KB
一键复制 编辑 原始数据 按行查看 历史
Eric Ling 提交于 2024-03-26 10:02 . version字段已被废弃
name: sponge
services:
mysql:
image: mysql:5.7
container_name: mysql
environment:
- MYSQL_ROOT_PASSWORD=123456
volumes:
- ./init-scripts:/docker-entrypoint-initdb.d
- mysql_vol:/var/lib/mysql
ports:
- 3306:3306
redis:
image: redis:latest
container_name: redis
volumes:
- redis_vol:/data
ports:
- 6379:6379
server1:
container_name: server1
environment:
- TARGET_APP=server
build:
context: .
dockerfile: dockerfile
command: ["0.0.0.0", "8001"]
volumes:
- server1_vol:/sponge/logs
ports:
- 8001
depends_on:
- mysql
- redis
server2:
container_name: server2
environment:
- TARGET_APP=server
build:
context: .
dockerfile: dockerfile
command: ["0.0.0.0", "8002"]
volumes:
- server2_vol:/sponge/logs
ports:
- 8002
depends_on:
- mysql
- redis
server3:
container_name: server3
environment:
- TARGET_APP=server
build:
context: .
dockerfile: dockerfile
command: ["0.0.0.0", "8003"]
volumes:
- server3_vol:/sponge/logs
ports:
- 8003
depends_on:
- mysql
- redis
nginx:
image: nginx:latest
container_name: nginx
ports:
- 8000:8000
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./tcp.d:/etc/nginx/tcp.d
depends_on:
- mysql
- redis
- server1
- server2
- server3
volumes:
mysql_vol: {}
redis_vol: {}
server1_vol: {}
server2_vol: {}
server3_vol: {}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化