version: '3.4'
networks:
  brizco:
    driver: bridge 

services:
  brizco.identity.api:
    image: ${DOCKER_REGISTRY-}brizcoidentityapi
    depends_on:
        - "postgres_image"
    build:
      context: .
      dockerfile: Brizco.Identity.Api/Dockerfile
    ports:
        - "5245:80"
    networks:
        - brizco

  berizco.api:
    image: ${DOCKER_REGISTRY-}berizcoapi
    build:
      context: .
      dockerfile: Berizco.Api/Dockerfile


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

