mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-23 20:28:47 +00:00
refactor: rename builders to server
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateBase64,
|
||||
generateRandomDomain,
|
||||
} from "@/server/templates/utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const randomDomain = generateRandomDomain(schema);
|
||||
const secretBase = generateBase64(64);
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: randomDomain,
|
||||
port: 3000,
|
||||
serviceName: "zipline",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
"ZIPLINE_PORT=3000",
|
||||
`ZIPLINE_SECRET=${secretBase}`,
|
||||
"ZIPLINE_RETURN_HTTPS=false",
|
||||
"ZIPLINE_LOGGER=true",
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
domains,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user