业务灰度docker-compose编写

version: '2'
services:
zoo1:
image: zookeeper:3.4.9
restart: always
ports:
- "2181:2181"
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zoo1:2888:3888
activemq:
image: webcenter/activemq:5.14.3
restart: always
ports:
- "8161:8161"
- "61613:61613"
- "61616:61616"
redis:
image: redis:3.2.7
restart: always
ports:
- "6379:6379"
# trade:
# image: openjdk:7-jdk
# ports:
# - "18010:18010"
# - "18001:18001"
# - "18002:18002"
# - "18123:18123"
# - "20899:20899"
# - "30888:30888"
# - "20880:20880"
# - "20882:20882"
# - "20881:20881"
# depends_on:
# - zoo1
# - activemq
# - redis
# environment:
# - _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
# volumes:
# - /srv/docker/app:/app
# entrypoint:
# - /app/entrypoint.sh
manageserver:
image: openjdk:7-jdk
ports:
- "18001:18001"
- "5009:5009"
depends_on:
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
- JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5009
- DB_URL=${DB_URL}
- DB_USER=${DB_USER}
- DB_PWD=${DB_PWD}
volumes:
- /srv/docker/app:/app
entrypoint:
- /app/entrypoint.sh
- manageserver
newsserver:
image: openjdk:7-jdk
depends_on:
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
- JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5008
- DB_URL=${DB_URL}
- DB_USER=${DB_USER}
- DB_PWD=${DB_PWD}
volumes:
- /srv/docker/app:/app
ports:
- "18002:18002"
- "5008:5008"
entrypoint:
- /app/entrypoint.sh
- newsserver
bankprocessor:
image: openjdk:7-jdk
depends_on:
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
- JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5010
- DB_URL=${DB_URL}
- DB_USER=${DB_USER}
- DB_PWD=${DB_PWD}
volumes:
- /srv/docker/app:/app
ports:
- "18010:18010"
- "5010:5010"
entrypoint:
- /app/entrypoint.sh
- bankprocessor
orgmanageserver:
image: openjdk:7-jdk
depends_on:
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
- JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5007
- DB_URL=${DB_URL}
- DB_USER=${DB_USER}
- DB_PWD=${DB_PWD}
volumes:
- /srv/docker/app:/app
ports:
- "18123:18123"
- "5007:5007"
entrypoint:
- /app/entrypoint.sh
- orgmanageserver
queryserver:
image: openjdk:7-jdk
depends_on:
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
- JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5006
- DB_URL=${DB_URL}
- DB_USER=${DB_USER}
- DB_PWD=${DB_PWD}
volumes:
- /srv/docker/app:/app
ports:
- "20899:20899"
- "5006:5006"
entrypoint:
- /app/entrypoint.sh
- queryserver
riskcontrolserver:
image: openjdk:7-jdk
depends_on:
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
- JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
- DB_URL=${DB_URL}
- DB_USER=${DB_USER}
- DB_PWD=${DB_PWD}
volumes:
- /srv/docker/app:/app
entrypoint:
- /app/entrypoint.sh
- riskcontrolserver
ports:
- "5005:5005"
scheduleserver:
image: openjdk:7-jdk
depends_on:
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
- JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5004
- DB_URL=${DB_URL}
- DB_USER=${DB_USER}
- DB_PWD=${DB_PWD}
volumes:
- /srv/docker/app:/app
ports:
- "30888:30888"
- "5004:5004"
entrypoint:
- /app/entrypoint.sh
- scheduleserver
sessionserver:
image: openjdk:7-jdk
depends_on:
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
- JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5003
- DB_URL=${DB_URL}
- DB_USER=${DB_USER}
- DB_PWD=${DB_PWD}
volumes:
- /srv/docker/app:/app
ports:
- "20880:20880"
- "5003:5003"
entrypoint:
- /app/entrypoint.sh
- sessionserver
settingsserver:
image: openjdk:7-jdk
depends_on:
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
- JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5011
- DB_URL=${DB_URL}
- DB_USER=${DB_USER}
- DB_PWD=${DB_PWD}
volumes:
- /srv/docker/app:/app
ports:
- "20882:20882"
- "5011:5011"
entrypoint:
- /app/entrypoint.sh
- settingsserver
smsserver:
image: openjdk:7-jdk
depends_on:
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
- JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5002
- DB_URL=${DB_URL}
- DB_USER=${DB_USER}
- DB_PWD=${DB_PWD}
volumes:
- /srv/docker/app:/app
entrypoint:
- /app/entrypoint.sh
- smsserver
ports:
- "5002:5002"
tradeserver:
image: openjdk:7-jdk
depends_on:
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
- JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5001
- DB_URL=${DB_URL}
- DB_USER=${DB_USER}
- DB_PWD=${DB_PWD}
volumes:
- /srv/docker/app:/app
ports:
- "20881:20881"
- "5001:5001"
entrypoint:
- /app/entrypoint.sh
- tradeserver
rweb01:
image: tomcat:7.0.75
depends_on:
# - trade
- manageserver
- tradeserver
- bankprocessor
- smsserver
- settingsserver
- sessionserver
- scheduleserver
- riskcontrolserver
- queryserver
- newsserver
- orgmanageserver
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
volumes:
- /srv/docker/tomcat/webapps/adminweb:/usr/local/tomcat/webapps/adminweb
- /srv/docker/tomcat/webapps/accountweb:/usr/local/tomcat/webapps/accountweb
# - /srv/docker/tomcat/webapps/kaihu:/usr/local/tomcat/webapps/kaihu
ports:
- "7071:8080"
rweb02:
image: tomcat:7.0.75
depends_on:
# - trade
- manageserver
- tradeserver
- bankprocessor
- smsserver
- settingsserver
- sessionserver
- scheduleserver
- riskcontrolserver
- queryserver
- newsserver
- orgmanageserver
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
volumes:
# - /srv/docker/tomcat/webapps/orgaccountweb:/usr/local/tomcat/webapps/orgaccountweb
- /srv/docker/tomcat/webapps/orgweb:/usr/local/tomcat/webapps/orgweb
# - /srv/docker/tomcat/webapps/authweb:/usr/local/tomcat/webapps/authweb
- /srv/docker/tomcat/webapps/quotationweb:/usr/local/tomcat/webapps/quotationweb
ports:
- "7072:8080"
tradeweb01:
image: tomcat:7.0.75
depends_on:
# - trade
- manageserver
- tradeserver
- bankprocessor
- smsserver
- settingsserver
- sessionserver
- scheduleserver
- riskcontrolserver
- queryserver
- newsserver
- orgmanageserver
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
volumes:
- /srv/docker/tomcat/webapps/tradeweb:/usr/local/tomcat/webapps/tradeweb
# - /srv/docker/tomcat/webapps/openapi:/usr/local/tomcat/webapps/openapi
ports:
- "7073:8080"
tradeweb02:
image: tomcat:7.0.75
depends_on:
# - trade
- manageserver
- tradeserver
- bankprocessor
- smsserver
- settingsserver
- sessionserver
- scheduleserver
- riskcontrolserver
- queryserver
- newsserver
- orgmanageserver
- zoo1
- activemq
- redis
environment:
- _JAVA_OPTIONS=-Duser.timezone=Asia/Shanghai
volumes:
- /srv/docker/tomcat/webapps/tradeweb:/usr/local/tomcat/webapps/tradeweb
# - /srv/docker/tomcat/webapps/openapi:/usr/local/tomcat/webapps/openapi
ports:
- "7074:8080"
webfront:
image: haproxy:1.7-alpine
ports:
- "16808:80"
depends_on:
- tradeweb01
- tradeweb02
- rweb01
- rweb02
volumes:
- /srv/docker/haproxy:/usr/local/etc/haproxy

你可能感兴趣的:(docker)