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,41 +0,0 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateBase64,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainDomain = generateRandomDomain(schema);
|
||||
const jwtSecret = generateBase64(32);
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: mainDomain,
|
||||
port: 8080,
|
||||
serviceName: "app",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
`TOLGEE_HOST=${mainDomain}`,
|
||||
"TOLGEE_AUTHENTICATION_ENABLED=true",
|
||||
"TOLGEE_AUTHENTICATION_INITIAL_PASSWORD=admin",
|
||||
"TOLGEE_AUTHENTICATION_INITIAL_USERNAME=admin",
|
||||
`TOLGEE_AUTHENTICATION_JWT_SECRET=${jwtSecret}`,
|
||||
"TOLGEE_MACHINE_TRANSLATION_GOOGLE_API_KEY=my_google_api_key",
|
||||
"TOLGEE_SMTP_AUTH=true",
|
||||
"TOLGEE_SMTP_FROM=Tolgee <no-reply@mydomain.com>",
|
||||
"TOLGEE_SMTPHOST=email-smtp.regional-region.amazonaws.com",
|
||||
"TOLGEE_SMTP_PASSWORD=omg/my/password",
|
||||
"TOLGEE_SMTP_PORT=465",
|
||||
"TOLGEE_SMTP_SSL_ENABLED=true",
|
||||
"TOLGEE_SMTP_USERNAME=user@company.com",
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
domains,
|
||||
};
|
||||
}
|
||||
26
blueprints/tolgee/template.yml
Normal file
26
blueprints/tolgee/template.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
variables:
|
||||
main_domain: ${randomDomain}
|
||||
jwt_secret: ${generateBase64(32)}
|
||||
|
||||
config:
|
||||
domains:
|
||||
- serviceName: app
|
||||
port: 8080
|
||||
host: ${main_domain}
|
||||
|
||||
env:
|
||||
TOLGEE_HOST: ${main_domain}
|
||||
TOLGEE_AUTHENTICATION_ENABLED: "true"
|
||||
TOLGEE_AUTHENTICATION_INITIAL_PASSWORD: "admin"
|
||||
TOLGEE_AUTHENTICATION_INITIAL_USERNAME: "admin"
|
||||
TOLGEE_AUTHENTICATION_JWT_SECRET: ${jwt_secret}
|
||||
TOLGEE_MACHINE_TRANSLATION_GOOGLE_API_KEY: "my_google_api_key"
|
||||
TOLGEE_SMTP_AUTH: "true"
|
||||
TOLGEE_SMTP_FROM: "Tolgee <no-reply@mydomain.com>"
|
||||
TOLGEE_SMTPHOST: "email-smtp.regional-region.amazonaws.com"
|
||||
TOLGEE_SMTP_PASSWORD: "omg/my/password"
|
||||
TOLGEE_SMTP_PORT: "465"
|
||||
TOLGEE_SMTP_SSL_ENABLED: "true"
|
||||
TOLGEE_SMTP_USERNAME: "user@company.com"
|
||||
|
||||
mounts: []
|
||||
Reference in New Issue
Block a user