mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
chore: add example domains schema templates
This commit is contained in:
parent
2d3b903edc
commit
fb4e06116c
@ -166,20 +166,26 @@ import {
|
|||||||
generateRandomDomain,
|
generateRandomDomain,
|
||||||
type Template,
|
type Template,
|
||||||
type Schema,
|
type Schema,
|
||||||
|
type DomainSchema,
|
||||||
} from "../utils";
|
} from "../utils";
|
||||||
|
|
||||||
export function generate(schema: Schema): Template {
|
export function generate(schema: Schema): Template {
|
||||||
// do your stuff here, like create a new domain, generate random passwords, mounts.
|
// do your stuff here, like create a new domain, generate random passwords, mounts.
|
||||||
const mainServiceHash = generateHash(schema.projectName);
|
const mainServiceHash = generateHash(schema.projectName);
|
||||||
const randomDomain = generateRandomDomain(schema);
|
const mainDomain = generateRandomDomain(schema);
|
||||||
const secretBase = generateBase64(64);
|
const secretBase = generateBase64(64);
|
||||||
const toptKeyBase = generateBase64(32);
|
const toptKeyBase = generateBase64(32);
|
||||||
|
|
||||||
|
const domains: DomainSchema[] = [
|
||||||
|
{
|
||||||
|
host: mainDomain,
|
||||||
|
port: 8000,
|
||||||
|
serviceName: "plausible",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
const envs = [
|
const envs = [
|
||||||
// If you want to show a domain in the UI, please add the prefix _HOST at the end of the variable name.
|
`BASE_URL=http://${mainDomain}`,
|
||||||
`PLAUSIBLE_HOST=${randomDomain}`,
|
|
||||||
"PLAUSIBLE_PORT=8000",
|
|
||||||
`BASE_URL=http://${randomDomain}`,
|
|
||||||
`SECRET_KEY_BASE=${secretBase}`,
|
`SECRET_KEY_BASE=${secretBase}`,
|
||||||
`TOTP_VAULT_KEY=${toptKeyBase}`,
|
`TOTP_VAULT_KEY=${toptKeyBase}`,
|
||||||
`HASH=${mainServiceHash}`,
|
`HASH=${mainServiceHash}`,
|
||||||
@ -195,6 +201,7 @@ export function generate(schema: Schema): Template {
|
|||||||
return {
|
return {
|
||||||
envs,
|
envs,
|
||||||
mounts,
|
mounts,
|
||||||
|
domains,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user