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,36 +0,0 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateBase64,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainDomain = generateRandomDomain(schema);
|
||||
const secretKeyBase = generateBase64(64);
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: mainDomain,
|
||||
port: 4000,
|
||||
serviceName: "doublezero",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
`DOUBLEZERO_HOST=${mainDomain}`,
|
||||
"DOUBLEZERO_PORT=4000",
|
||||
`SECRET_KEY_BASE=${secretKeyBase}`,
|
||||
"AWS_ACCESS_KEY_ID=your-aws-access-key",
|
||||
"AWS_SECRET_ACCESS_KEY=your-aws-secret-key",
|
||||
"AWS_REGION=your-aws-region",
|
||||
"SQS_URL=your-aws-sqs-url",
|
||||
"SYSTEM_EMAIL=",
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
domains,
|
||||
};
|
||||
}
|
||||
21
blueprints/doublezero/template.yml
Normal file
21
blueprints/doublezero/template.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
variables:
|
||||
main_domain: ${randomDomain}
|
||||
secret_key_base: ${generateBase64(64)}
|
||||
|
||||
config:
|
||||
domains:
|
||||
- serviceName: doublezero
|
||||
port: 4000
|
||||
host: ${main_domain}
|
||||
|
||||
env:
|
||||
- DOUBLEZERO_HOST=${main_domain}
|
||||
- DOUBLEZERO_PORT=4000
|
||||
- SECRET_KEY_BASE=${secret_key_base}
|
||||
- AWS_ACCESS_KEY_ID=your-aws-access-key
|
||||
- AWS_SECRET_ACCESS_KEY=your-aws-secret-key
|
||||
- AWS_REGION=your-aws-region
|
||||
- SQS_URL=your-aws-sqs-url
|
||||
- SYSTEM_EMAIL=
|
||||
|
||||
mounts: []
|
||||
Reference in New Issue
Block a user