first pass

This commit is contained in:
2025-11-29 14:50:33 -05:00
parent cf3015638a
commit 0bfab0bdc8
10 changed files with 631 additions and 0 deletions

29
src/config.ts Normal file
View File

@@ -0,0 +1,29 @@
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,
},
])
);