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,45 +0,0 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generatePassword,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainDomain = generateRandomDomain(schema);
|
||||
|
||||
const apiKey = generatePassword(32);
|
||||
const encryptionKey = generatePassword(32);
|
||||
const jwtSecret = generatePassword(32);
|
||||
const couchDbPassword = generatePassword(32);
|
||||
const redisPassword = generatePassword(32);
|
||||
const minioAccessKey = generatePassword(32);
|
||||
const minioSecretKey = generatePassword(32);
|
||||
const watchtowerPassword = generatePassword(32);
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: mainDomain,
|
||||
port: 10000,
|
||||
serviceName: "proxy",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
`BB_HOST=${mainDomain}`,
|
||||
`BB_INTERNAL_API_KEY=${apiKey}`,
|
||||
`BB_API_ENCRYPTION_KEY=${encryptionKey}`,
|
||||
`BB_JWT_SECRET=${jwtSecret}`,
|
||||
`BB_COUCHDB_PASSWORD=${couchDbPassword}`,
|
||||
`BB_REDIS_PASSWORD=${redisPassword}`,
|
||||
`BB_WATCHTOWER_PASSWORD=${watchtowerPassword}`,
|
||||
`BB_MINIO_ACCESS_KEY=${minioAccessKey}`,
|
||||
`BB_MINIO_SECRET_KEY=${minioSecretKey}`,
|
||||
];
|
||||
|
||||
return {
|
||||
domains,
|
||||
envs,
|
||||
};
|
||||
}
|
||||
29
blueprints/budibase/template.yml
Normal file
29
blueprints/budibase/template.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
variables:
|
||||
main_domain: ${randomDomain}
|
||||
api_key: ${generatePassword(32)}
|
||||
encryption_key: ${generatePassword(32)}
|
||||
jwt_secret: ${generatePassword(32)}
|
||||
couchdb_password: ${generatePassword(32)}
|
||||
redis_password: ${generatePassword(32)}
|
||||
minio_access_key: ${generatePassword(32)}
|
||||
minio_secret_key: ${generatePassword(32)}
|
||||
watchtower_password: ${generatePassword(32)}
|
||||
|
||||
config:
|
||||
domains:
|
||||
- serviceName: proxy
|
||||
port: 10000
|
||||
host: ${main_domain}
|
||||
|
||||
env:
|
||||
- BB_HOST=${main_domain}
|
||||
- BB_INTERNAL_API_KEY=${api_key}
|
||||
- BB_API_ENCRYPTION_KEY=${encryption_key}
|
||||
- BB_JWT_SECRET=${jwt_secret}
|
||||
- BB_COUCHDB_PASSWORD=${couchdb_password}
|
||||
- BB_REDIS_PASSWORD=${redis_password}
|
||||
- BB_WATCHTOWER_PASSWORD=${watchtower_password}
|
||||
- BB_MINIO_ACCESS_KEY=${minio_access_key}
|
||||
- BB_MINIO_SECRET_KEY=${minio_secret_key}
|
||||
|
||||
mounts: []
|
||||
Reference in New Issue
Block a user