mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
refactor: convert template.yml files to template.toml format
- Updated the script to convert 'template.yml' files to 'template.toml' files during directory processing. - Added new 'template.toml' files for Backrest and BlinkO blueprints with appropriate configuration settings.
This commit is contained in:
parent
38e8d9e66a
commit
ec644490be
@ -22,11 +22,15 @@ function processDirectory(dirPath) {
|
||||
if (stat.isDirectory()) {
|
||||
processDirectory(filePath);
|
||||
} else if (file === "template.yml") {
|
||||
console.log(`Deleting ${filePath}`);
|
||||
fs.unlinkSync(filePath);
|
||||
console.log(`Converting ${filePath}`);
|
||||
const yamlContent = fs.readFileSync(filePath, "utf8");
|
||||
const tomlContent = convertYamlToToml(yamlContent);
|
||||
const tomlPath = path.join(dirPath, "template.toml");
|
||||
fs.writeFileSync(tomlPath, tomlContent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Ruta al directorio blueprints relativa al script
|
||||
const blueprintsPath = path.join(__dirname, "..", "blueprints");
|
||||
processDirectory(blueprintsPath);
|
||||
|
11
blueprints/backrest/template.toml
Normal file
11
blueprints/backrest/template.toml
Normal file
@ -0,0 +1,11 @@
|
||||
[variables]
|
||||
main_domain = "${domain}"
|
||||
|
||||
[config]
|
||||
env = ["TZ=Europe/Paris"]
|
||||
mounts = []
|
||||
|
||||
[[config.domains]]
|
||||
serviceName = "backrest"
|
||||
port = 9_898
|
||||
host = "${main_domain}"
|
20
blueprints/blinko/template.toml
Normal file
20
blueprints/blinko/template.toml
Normal file
@ -0,0 +1,20 @@
|
||||
[variables]
|
||||
main_domain = "${domain}"
|
||||
postgres_password = "${password:16}"
|
||||
nextauth_secret = "${password:32}"
|
||||
nextauth_url = "http://${main_domain}"
|
||||
next_public_base_url = "http://${main_domain}"
|
||||
|
||||
[config]
|
||||
env = [
|
||||
"nextauth_secret=${nextauth_secret}",
|
||||
"postgres_password=${postgres_password}",
|
||||
"nextauth_url=${nextauth_url}",
|
||||
"next_public_base_url=${next_public_base_url}",
|
||||
]
|
||||
mounts = []
|
||||
|
||||
[[config.domains]]
|
||||
serviceName = "blinko-website"
|
||||
port = 1_111
|
||||
host = "${main_domain}"
|
Loading…
Reference in New Issue
Block a user