---
version: '2'
services:
  broker:
    image: rabbitmq:3-management
    ports:
      - "15672:15672"
    networks:
      - back-tier
  web:
    build: .
    command:
      - gunicorn
      - -c
      - /code/settings.py
      - lintreview.web:app
    environment: &lintreview_env
      LINTREVIEW_GUNICORN_BIND: '0.0.0.0:5000'
      LINTREVIEW_GUNICORN_LOG_ACCESS: '-'
      LINTREVIEW_GUNICORN_LOG_ERROR: '-'
    ports:
      - "5000:5000"
    links:
      - broker
    networks:
      - front-tier
      - back-tier
  worker:
    build: .
    command:
      - celery
      - -A
      - lintreview.tasks
      - worker
      - -l
      - info
    environment:
      <<: *lintreview_env
      C_FORCE_ROOT: "true"
    links:
      - broker
    networks:
      - back-tier

networks:
  front-tier:
    driver: bridge
  back-tier:
    driver: bridge

---
version: '2'
services:
  broker:
    image: rabbitmq:3-management
    ports:
      - "15672:15672"
    networks:
      - back-tier
  web:
    image: markstory/lint-review
    command:
      - gunicorn
      - -c
      - /code/settings.py
      - lintreview.web:app
    environment: &lintreview_env
      LINTREVIEW_GUNICORN_BIND: '0.0.0.0:5000'
      LINTREVIEW_GUNICORN_LOG_ACCESS: '-'
      LINTREVIEW_GUNICORN_LOG_ERROR: '-'
    ports:
      - "5000:5000"
    links:
      - broker
    networks:
      - front-tier
      - back-tier
  worker:
    image: markstory/lint-review
    command:
      - celery
      - -A
      - lintreview.tasks
      - worker
      - -l
      - info
    environment:
      <<: *lintreview_env
      C_FORCE_ROOT: "true"
    links:
      - broker
    networks:
      - back-tier

networks:
  front-tier:
    driver: bridge
  back-tier:
    driver: bridge

Use image instead of building
Use image instead of building

Since docker hub now builds it for us, let's use that
