1. 程式人生 > >docker compose示例

docker compose示例

mes PE his AS pos -s vol pps containe

version: 2
services:
    game-server:
        image: 192.168.1.60:5000/tomcat:8
        container_name: game-server
        ports:
          - 8019:8019
        environment:
          - TZ=Asia/Shanghai
        volumes:
          - /opt/wars/micro-service/game-server:/usr/local/tomcat/webapps
          
- /opt/logs/game-server:/home/liying/logs/game-server trade-server: image: 192.168.1.60:5000/tomcat:8 container_name: trade-server depends_on: - game-server ports: - 60012:60012 - 60011:60011 - 6080:8080 environment:
- TZ=Asia/Shanghai volumes: - /opt/wars/micro-service/trade-server:/usr/local/tomcat/webapps - /opt/logs/trade-server:/home/liying/logs/trade-server trade-batch: image: 192.168.1.60:5000/tomcat:8 container_name: trade-batch environment: - TZ=Asia/Shanghai volumes:
- /opt/wars/micro-service/trade-batch:/usr/local/tomcat/webapps - /opt/logs/trade-batch:/home/liying/logs/trade-batch depends_on: - game-server - trade-server cash-server: image: 192.168.1.60:5000/tomcat:8 container_name: cash-server ports: - 60020:60020 environment: - TZ=Asia/Shanghai volumes: - /opt/wars/micro-service/cash-server:/usr/local/tomcat/webapps - /opt/logs/cash-server:/home/liying/logs/cash-server trade-his-server: image: 192.168.1.60:5000/tomcat:8 container_name: trade-his-server ports: - 9001:9001 - 9002:9002 environment: - TZ=Asia/Shanghai volumes: - /opt/wars/micro-service/trade-his-server:/usr/local/tomcat/webapps - /opt/logs/trade-his-server:/home/liying/logs/trade-his-server

docker compose示例