import { hostname } from "node:os";
import { getHostIp } from "./network.js";
function getServerContext(config) {
  const context = {
    appID: config.app.id,
    taskID: config.taskID,
    hostIP: getHostIp(),
    hostname: hostname(),
    timestamp: (/* @__PURE__ */ new Date()).toISOString(),
    // Platform-specific environment variables
    flyAppName: process.env.FLY_APP_NAME,
    flyMachineID: process.env.FLY_MACHINE_ID,
    railwayProjectID: process.env.RAILWAY_PROJECT_ID,
    railwayProjectName: process.env.RAILWAY_PROJECT_NAME,
    railwayEnvironmentID: process.env.RAILWAY_ENVIRONMENT_ID,
    railwayEnvironmentName: process.env.RAILWAY_ENVIRONMENT_NAME,
    railwayServiceID: process.env.RAILWAY_SERVICE_ID,
    railwayServiceName: process.env.RAILWAY_SERVICE_NAME,
    railwayDeploymentID: process.env.RAILWAY_DEPLOYMENT_ID,
    gcpProject: process.env.GOOGLE_CLOUD_PROJECT ?? process.env.GCP_PROJECT ?? process.env.GCLOUD_PROJECT,
    coolifyDomainName: process.env.COOLIFY_FQDN,
    coolifyContainerName: process.env.COOLIFY_CONTAINER_NAME,
    azureEnvName: process.env.AZURE_ENV_NAME
  };
  return Object.fromEntries(
    Object.entries(context).filter(([_, v]) => v !== void 0)
  );
}
export {
  getServerContext
};
//# sourceMappingURL=server-context.js.map
