version: '3.4'

     
networks:
  dockerapi-dev:
    driver: bridge 


services:
  documed.api:
    image: documedapi:latest
    depends_on:
      - "postgres_image"
    build:
      context: .
      dockerfile: DocuMed.Api/Dockerfile
    ports:
      - "5288:80"
    networks:
      - dockerapi-dev

  postgres_image:
    image: postgres:latest
    ports:
      - "5432"
    restart: always
    volumes: 
      - db:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: "brizcouser"
      POSTGRES_PASSWORD: "brizco"
      POSTGRES_DB: "BrizCoDB"
    networks:
      - dockerapi-dev
volumes:
  db:
    driver: local
