mirror of
https://github.com/andwati/dokploy.git
synced 2026-12-04 00:38:46 +00:00
32 lines
534 B
TypeScript
32 lines
534 B
TypeScript
import {
|
|
type DomainSchema,
|
|
type Schema,
|
|
type Template,
|
|
generateHash,
|
|
generatePassword,
|
|
generateRandomDomain,
|
|
} from "../utils";
|
|
|
|
export function generate(schema: Schema): Template {
|
|
const randomDomain = generateRandomDomain(schema);
|
|
const randomPassword = generatePassword();
|
|
|
|
const domains: DomainSchema[] = [
|
|
{
|
|
host: randomDomain,
|
|
port: 2342,
|
|
serviceName: "photoprism",
|
|
},
|
|
];
|
|
|
|
const envs = [
|
|
`BASE_URL=http://${randomDomain}`,
|
|
`ADMIN_PASSWORD=${randomPassword}`,
|
|
];
|
|
|
|
return {
|
|
envs,
|
|
domains,
|
|
};
|
|
}
|