docker-archive / dockercloud-haproxy

HAproxy image that autoreconfigures itself when used in Docker Cloud
https://cloud.docker.com/
651 stars 187 forks source link

Put stats on Virtual Host on a port 80 / 443 #241

Open mark-stopka opened 6 years ago

mark-stopka commented 6 years ago

Hi, I was wondering if there is any way to put stats as a VHOST on port 80 along other vhosts as opposed to to listening on a different port... I have tries this:

version: "2"
services:
  exchange.local.perlur.cloud:
    image: dockercloud/haproxy:latest
    ports:
       - 80:80
       - 443:443
    depends_on:
      - app.exchange.local.perlur.cloud
      - api.exchange.local.perlur.cloud
    links:
      - app.exchange.local.perlur.cloud
      - api.exchange.local.perlur.cloud
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - VIRTUAL_HOST="exchange.local.perlur.cloud"

  app.exchange.local.perlur.cloud:
    image: reflexions/docker-laravel:latest
    env_file: .env
    depends_on:
      - database
    links:
      - database
    volumes:
      - ./app.exchange.perlur.cloud:/var/www/laravel
    environment:
      - VIRTUAL_HOST="app.exchange.local.perlur.cloud"

  api.exchange.local.perlur.cloud:
    image: reflexions/docker-laravel:latest
    env_file: .env
    depends_on:
      - database
    links:
      - database
    volumes:
      - ./api.exchange.perlur.cloud:/var/www/laravel
    environment:
      - VIRTUAL_HOST="api.exchange.local.perlur.cloud" 

But that does not add ANY acl rules; I would like to achieve same results as folks here...