
web:
    build: spendb/Dockerfile
    command: spendb runserver
    ports:
        - "5000:5000"
    links:
        - db

db:
    image: postgres:9.4
    environment:
        POSTGRES_USER: spendb
        POSTGRES_PASSWORD: spendb
    expose: 
        - "5432"
    volumes:
        - /srv/spendb/db:/var/lib/postgresql
        - /srv/spendb/logs/postgresql:/var/log

web:
    build: .
    command: gunicorn -w 5 spendb.wsgi:app
    ports:
        - "8000:8000"
    links:
        - db
        - worker

db:
    image: postgres:9.4
    environment:
      - POSTGRES_USER= spendb
      - POSTGRES_PASSWORD= spendb
    expose: 
        - "5432"
    volumes:
        - /srv/spendb/db:/var/lib/postgresql
        - /srv/spendb/logs/postgresql:/var/log
rabbitmq:
    image: rabbitmq
worker:
    build: .
    command: celery -A spendb.tasks worker -l info
    links:
        - rabbitmq
        - db

Add database, worker, rabbitmq to compose
Add database, worker, rabbitmq to compose

use local files for build
use gunicorn for server
