Files
deployer2/src/config.ts
2025-11-29 14:50:33 -05:00

30 lines
552 B
TypeScript

import userConfig from "../config";
import hash from "object-hash";
export type DeployerConfig = {
services: {
[host: string]: {
user: string;
repo: string;
branch: string;
};
};
giteaUrl: string;
directory: string;
basePort: number;
token: string;
systemServicesDir: string;
};
export const config = userConfig as DeployerConfig;
export const indexedConfig = Object.fromEntries(
Object.entries(config.services).map(([host, service], i) => [
hash(service),
{
...service,
host,
port: config.basePort + i,
},
])
);