version: "3"
services:
  db:
    image: postgres:9.6.1
    volumes:
      - postgres96:/var/lib/postgresql
    deploy:
      replicas: 1
  elasticsearch:
    image: elasticsearch:1.7.6
    volumes:
      - elasticsearch17:/usr/share/elasticsearch/data
    deploy:
      replicas: 1
  web:
    image: "${IMAGE_NAME:-kinaklub/next.filmfest.by:latest}"
    command: launch
    environment:
      STACK_PREFIX: next_
    deploy:
      replicas: 1
  haproxy:
    image: kinaklub/filmfest-haproxy:0.1
    ports:
      - "80:80"
    environment:
      BACKEND_HOSTNAME: next_web
    deploy:
      replicas: 1
volumes:
  postgres96:
    driver: local
  elasticsearch17:
    driver: local

version: "3"
services:
  db:
    image: postgres:9.6.1
    volumes:
      - postgres96:/var/lib/postgresql
    deploy:
      replicas: 1
  elasticsearch:
    image: elasticsearch:1.7.6
    volumes:
      - elasticsearch17:/usr/share/elasticsearch/data
    deploy:
      replicas: 1
  web:
    image: "${IMAGE_NAME:-kinaklub/next.filmfest.by:latest}"
    command: launch
    environment:
      STACK_PREFIX: next_
    deploy:
      replicas: 1
  haproxy:
    image: kinaklub/filmfest-haproxy:0.2
    ports:
      - "80:80"
    environment:
      BACKEND_HOSTNAME: next_web
    deploy:
      replicas: 1
volumes:
  postgres96:
    driver: local
  elasticsearch17:
    driver: local

Switch to haproxy image 0.2
Switch to haproxy image 0.2

Image 0.2 adds check directive to backend server - otherwise the server
becomes down forever on any error.
