app:
  build: .
  command: "bundle exec puma -C config/puma.rb"
  environment:
    - DATABASE_HOST=db
    - DATABASE_USERNAME=postgres
    - DATABASE_PASSWORD=
    - DATABASE_NAME=postgres
    - GEM_HOME=/bundle
  volumes:
    - .:/usr/src/app
  volumes_from:
    - bundle
  links:
    - db
  ports:
    - "3000:3000"

worker:
  image: barcelonaparticipa_app
  environment: 
    - DATABASE_HOST=db
    - DATABASE_USERNAME=postgres
    - DATABASE_PASSWORD=
    - DATABASE_NAME=postgres
    - GEM_HOME=/bundle
  volumes:
    - .:/usr/src/app
  volumes_from:
    - bundle
  links:
    - db
  command: rake jobs:work

bundle:
  image: ubuntu:15.04
  command: echo 'Nothing to do here'
  volumes:
    - /bundle

db:
  image: postgres
  volumes_from:
    - db_data

db_data:
  image: ubuntu:15.04
  command: echo 'Nothing to do here'
  volumes:
    - /var/lib/postgresql/data

app:
  build: .
  command: "bundle exec puma -C config/puma.rb"
  environment:
    - DATABASE_HOST=db
    - DATABASE_USERNAME=postgres
    - DATABASE_PASSWORD=
    - DATABASE_NAME=postgres
    - GEM_HOME=/bundle
  volumes:
    - .:/barcelona-participa
  volumes_from:
    - bundle
  links:
    - db
  ports:
    - "3000:3000"

worker:
  image: barcelonaparticipa_app
  environment: 
    - DATABASE_HOST=db
    - DATABASE_USERNAME=postgres
    - DATABASE_PASSWORD=
    - DATABASE_NAME=postgres
    - GEM_HOME=/bundle
  volumes:
    - .:/barcelona-participa
  volumes_from:
    - bundle
  links:
    - db
  command: rake jobs:work

bundle:
  image: ubuntu:15.04
  command: echo 'Nothing to do here'
  volumes:
    - /bundle

db:
  image: postgres
  volumes_from:
    - db_data

db_data:
  image: ubuntu:15.04
  command: echo 'Nothing to do here'
  volumes:
    - /var/lib/postgresql/data

Fix docker dev environment using correct volumes
Fix docker dev environment using correct volumes
