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,29 +0,0 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: generateRandomDomain(schema),
|
||||
port: 3000,
|
||||
serviceName: "docmost",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
"POSTGRES_DB=docmost",
|
||||
"POSTGRES_USER=docmost",
|
||||
"POSTGRES_PASSWORD=STRONG_DB_PASSWORD",
|
||||
"APP_URL=http://localhost:3000",
|
||||
"APP_SECRET=VERY_STRONG_SECRET",
|
||||
];
|
||||
|
||||
return {
|
||||
domains,
|
||||
envs,
|
||||
};
|
||||
}
|
||||
19
blueprints/docmost/template.yml
Normal file
19
blueprints/docmost/template.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
variables:
|
||||
main_domain: ${randomDomain}
|
||||
postgres_password: ${generatePassword}
|
||||
app_secret: ${generatePassword}
|
||||
|
||||
config:
|
||||
domains:
|
||||
- serviceName: docmost
|
||||
port: 3000
|
||||
host: ${main_domain}
|
||||
|
||||
env:
|
||||
- POSTGRES_DB=docmost
|
||||
- POSTGRES_USER=docmost
|
||||
- POSTGRES_PASSWORD=${postgres_password}
|
||||
- APP_URL=http://${main_domain}:3000
|
||||
- APP_SECRET=${app_secret}
|
||||
|
||||
mounts: []
|
||||
Reference in New Issue
Block a user