mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
feat: migrate templates
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateBase64,
|
||||
generateRandomDomain,
|
||||
} from "@/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,
|
||||
};
|
||||
}
|
||||
17
blueprints/zipline/template.yml
Normal file
17
blueprints/zipline/template.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
variables:
|
||||
main_domain: ${randomDomain}
|
||||
secret_base: ${generateBase64(64)}
|
||||
|
||||
config:
|
||||
domains:
|
||||
- serviceName: zipline
|
||||
port: 3000
|
||||
host: ${main_domain}
|
||||
|
||||
env:
|
||||
ZIPLINE_PORT: "3000"
|
||||
ZIPLINE_SECRET: ${secret_base}
|
||||
ZIPLINE_RETURN_HTTPS: "false"
|
||||
ZIPLINE_LOGGER: "true"
|
||||
|
||||
mounts: []
|
||||
Reference in New Issue
Block a user