# Use postgres/example user/password credentials
version: '3.9'

services:

  database:
    container_name: postgres
    build:
      context: .docker/database
    restart: always
    environment:
      POSTGRES_PASSWORD: postgres
    ports:
      - 5432:5432

  adminer:
    image: adminer
    restart: always
    depends_on:
      - database
    ports:
      - 8080:8080

  app:
    container_name: flask-api
    build:
      context: .
      dockerfile: .docker/api/Dockerfile
    restart: always
    depends_on:
      - database
    ports:
      - 5000:5000
    environment:
      FLASK_DEBUG: 1
    volumes:
      - "./app:/app"
    