version: "3"
services:

  web:
    build: .
    ports:
      - "8000:8000"
    environment:
     - PYDAL_URI=postgres://foo:bar@postgres:5432/baz
    stdin_open: true
    tty: true
    depends_on:
      - postgres

  postgres:
    restart: always
    image: postgres
    environment:
      - POSTGRES_USER=foo
      - POSTGRES_PASSWORD=bar
      - POSTGRES_DB=baz
      - POSTGRES_PORT=5432
    ports:
      - "5432:5432"
    volumes:
       - ./data/postgres:/var/lib/postgresql/data
