version: "3.2"

services:
  web:
    image: papercups
    ports:
      - "3000:3000"
      - "4000:4000"
    volumes:
      - type: bind
        source: .
        target: /usr/src/app
    command:
      - ./docker-entrypoint.sh
    depends_on:
      - db
    environment:
      DATABASE_URL: "ecto://postgres:postgres@db/postgres"
  db:
    image: postgres:alpine
    container_name: papercups
    ports: 
      - "5432:5432"
    environment: 
      POSTGRES_PASSWORD: postgres
