发布带pinpoint的web应用

 发布一个应用,使用本地的catalina.sh

 

通过服务发布

docker stack deploy -c docker-compose.yml   wms

 

通过docker-compose.yml 发布

docker-compose up

docker-compose stop

 

docker-compose.yml

version: "3"
services:
  web:
    image: dockerby001/tomcat8-jdk8:3.0
    #image: tomcat:8.0
    deploy:
      replicas: 3
     #resources:
       # limits:
        #  cpus: "0.1"
         # memory: 50M
    volumes:
      - "/root/data/app/gis/wj-gis-web:/usr/local/tomcat/webapps/gis_web"
      - "/root/data/app/gis/catalina.sh:/usr/local/tomcat/bin/catalina.sh"
# restart_policy:
      #  condition: on-failure
     # placement:
      #  constraints: [node.role == manager]
    ports:
      - "4001:8080"
    networks:
      - webnet
networks:
  webnet:

 

 

配置项目 java虚拟机参数

version: "3"
services:
  web:
    image: dockerby001/tomcat8_jdk8:2.0
    #image: tomcat:8.0
    deploy:
      replicas: 1
     #resources:
       # limits:
        #  cpus: "0.1"
         # memory: 50M
    volumes:
      - "/root/docker/gmms_web/gmms_web:/usr/local/apache-tomcat-8.0.53/webapps/gmms_web"
      - "/var/lib/docker/volumes/pinpoint-docker-master_data-volume/_data:/pinpoint-agent"
    # restart_policy:
      #  condition: on-failure
     # placement:
      #  constraints: [node.role == manager]
    environment:
        JAVA_OPTS: "-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME}"
    ports:
      - "4002:8080"
    networks:
      - webnet
networks:
  webnet:

 

你可能感兴趣的:(docker)