version: "3.9"
services:
  web:
    build: ./IpInfoViewer.Web
    ports:
      - "444:80"
  api:
    build:
        context: .
        dockerfile: ./IpInfoViewer/Dockerfile
    ports:
      - "8081:80"
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ASPNETCORE_URLS=http://+:80
  osm:
    image: andreimagic/openstreetmaps:v2
    ports:
      - 8082:80
  db:
    image: postgres:15
    restart: always
    ports:
      - 5433:5432
    environment:
      - PGUSER=postgres
      - POSTGRES_PASSWORD=0000
    healthcheck:
      test: ["CMD-SHELL", "pg_isready"]
      interval    : 1s
      timeout: 5s
      retries: 10
  country-ping-info:
    build: 
      context: .
      dockerfile: ./IpInfoViewer.CountryPingInfoService/Dockerfile
    environment:
      - DOTNEt_ENVIRONMENT=Development
  map-points-info:
    build: 
      context: .
      dockerfile: ./IpInfoViewer.MapPointsService/Dockerfile
    environment:
      - DOTNEt_ENVIRONMENT=Development