version: '3'

services:
  backend:
    build:
      context: ./app-monolith/
    ports:
      - "8080:8080"
    links:
      - database
  database:
    image: postgres:10
    ports:
      - "5432:5432"
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=postgres
    volumes:
      - data:/var/lib/postgresql/data

volumes:
  data:
    driver: local
