services:
  api:
    build:
      context: .
      dockerfile: ./src/API.WebHost/Dockerfile
    container_name: voipmundo-api
    restart: unless-stopped
    network_mode: host           # 👈 chave
    environment:
      ASPNETCORE_ENVIRONMENT: Production
      ASPNETCORE_URLS: http://+:5005   # use uma porta livre no host
      # Connection string usa 127.0.0.1 porque está em rede do host:
      ConnectionStrings__Default: "Server=127.0.0.1;Port=3306;Database=voipmund_sitenovo;User=voipmund_sitevm;Password=ajq9302;SslMode=None;Allow User Variables=true;"
#    ports: [ "8082:8082" ]  # NÃO use ports com host network
