version: '2'
services:

  haproxy:
    image: "dockercloud/haproxy:latest"
    links:
     - tomcat
    networks:
     - csip_default
    ports:
     - "80:80"
    volumes:
     - "/var/run/docker.sock:/var/run/docker.sock"
     
  tomcat:
    build: ./csip-tc
    image: "csip-tomcat:latest"
    links:
      - mongodb
    networks:
      - csip_default
    ports:
      - "8080"
#         internal without proxy    
#     - "80:8080"
    volumes:
      - "./deploy:/tmp/deploy"           
      
  mongodb:
    image: "mongo:latest"
    networks:
      - csip_default
      
networks:
  csip_default:
    external: true
