{
  debug
}

local.api.astra-corp.net {
  tls internal

  # Serve static assets directly
  @static {
    path /bundles/* /favicon.ico /robots.txt
    file {
      try_files {path}
    }
  }
  root * /var/www/html/public
  file_server @static {
    root /var/www/html/public
  }

  # Proxy everything else to the API
  reverse_proxy http://astracorp_api

  log {
    output file /var/log/api-access.log {
      roll_size 10mb
      roll_keep 2
    }
  }
}

local.app.astra-corp.net {
  tls internal
  reverse_proxy astracorp_app:3000
  log {
    output file /var/log/app-access.log {
      roll_size 10mb
      roll_keep 2
    }
  }
}
