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,30 +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: 7080,
|
||||
serviceName: "coder",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
"CODER_ACCESS_URL=",
|
||||
"CODER_HTTP_ADDRESS=0.0.0.0:7080",
|
||||
"",
|
||||
"POSTGRES_DB=coder",
|
||||
"POSTGRES_USER=coder",
|
||||
"POSTGRES_PASSWORD=VERY_STRONG_PASSWORD",
|
||||
];
|
||||
|
||||
return {
|
||||
domains,
|
||||
envs,
|
||||
};
|
||||
}
|
||||
18
blueprints/coder/template.yml
Normal file
18
blueprints/coder/template.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
variables:
|
||||
main_domain: ${randomDomain}
|
||||
postgres_password: ${generatePassword}
|
||||
|
||||
config:
|
||||
domains:
|
||||
- serviceName: coder
|
||||
port: 7080
|
||||
host: ${main_domain}
|
||||
|
||||
env:
|
||||
- CODER_ACCESS_URL=
|
||||
- CODER_HTTP_ADDRESS=0.0.0.0:7080
|
||||
- POSTGRES_DB=coder
|
||||
- POSTGRES_USER=coder
|
||||
- POSTGRES_PASSWORD=${postgres_password}
|
||||
|
||||
mounts: []
|
||||
Reference in New Issue
Block a user