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,38 +0,0 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const dashboardDomain = generateRandomDomain(schema);
|
||||
const backendDomain = generateRandomDomain(schema);
|
||||
const actionsDomain = generateRandomDomain(schema);
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: dashboardDomain,
|
||||
port: 6791,
|
||||
serviceName: "dashboard",
|
||||
},
|
||||
{
|
||||
host: backendDomain,
|
||||
port: 3210,
|
||||
serviceName: "backend",
|
||||
},
|
||||
{
|
||||
host: actionsDomain,
|
||||
port: 3211,
|
||||
serviceName: "backend",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
`NEXT_PUBLIC_DEPLOYMENT_URL=http://${backendDomain}`,
|
||||
`CONVEX_CLOUD_ORIGIN=http://${backendDomain}`,
|
||||
`CONVEX_SITE_ORIGIN=http://${actionsDomain}`,
|
||||
];
|
||||
|
||||
return { envs, domains };
|
||||
}
|
||||
23
blueprints/convex/template.yml
Normal file
23
blueprints/convex/template.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
variables:
|
||||
dashboard_domain: ${randomDomain}
|
||||
backend_domain: ${randomDomain}
|
||||
actions_domain: ${randomDomain}
|
||||
|
||||
config:
|
||||
domains:
|
||||
- serviceName: dashboard
|
||||
port: 6791
|
||||
host: ${dashboard_domain}
|
||||
- serviceName: backend
|
||||
port: 3210
|
||||
host: ${backend_domain}
|
||||
- serviceName: backend
|
||||
port: 3211
|
||||
host: ${actions_domain}
|
||||
|
||||
env:
|
||||
- NEXT_PUBLIC_DEPLOYMENT_URL=http://${backend_domain}
|
||||
- CONVEX_CLOUD_ORIGIN=http://${backend_domain}
|
||||
- CONVEX_SITE_ORIGIN=http://${actions_domain}
|
||||
|
||||
mounts: []
|
||||
Reference in New Issue
Block a user