version: '2'

services:
  postgres:
    image: postgres:9.3
    environment:
      - POSTGRES_PASSWORD=mysecretpassword
      - POSTGRES_USER=parsley
    volumes:
      - sql-data:/var/lib/postgresql/data
  web:
    build: .
    ports:
      - "3000:80"
    volumes:
      - .:/home/app/parsley/
    links:
      - postgres
volumes:
  sql-data:
    driver: local