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,43 +0,0 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateBase64,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainDomain = generateRandomDomain(schema);
|
||||
const secretBase = generateBase64(64);
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: mainDomain,
|
||||
port: 3000,
|
||||
serviceName: "unsend",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
"REDIS_URL=redis://unsend-redis-prod:6379",
|
||||
"POSTGRES_USER=postgres",
|
||||
"POSTGRES_PASSWORD=postgres",
|
||||
"POSTGRES_DB=unsend",
|
||||
"DATABASE_URL=postgresql://postgres:postgres@unsend-db-prod:5432/unsend",
|
||||
"NEXTAUTH_URL=http://localhost:3000",
|
||||
`NEXTAUTH_SECRET=${secretBase}`,
|
||||
"GITHUB_ID='Fill'",
|
||||
"GITHUB_SECRET='Fill'",
|
||||
"AWS_DEFAULT_REGION=us-east-1",
|
||||
"AWS_SECRET_KEY='Fill'",
|
||||
"AWS_ACCESS_KEY='Fill'",
|
||||
"DOCKER_OUTPUT=1",
|
||||
"API_RATE_LIMIT=1",
|
||||
"DISCORD_WEBHOOK_URL=",
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
domains,
|
||||
};
|
||||
}
|
||||
28
blueprints/unsend/template.yml
Normal file
28
blueprints/unsend/template.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
variables:
|
||||
main_domain: ${randomDomain}
|
||||
secret_base: ${generateBase64(64)}
|
||||
|
||||
config:
|
||||
domains:
|
||||
- serviceName: unsend
|
||||
port: 3000
|
||||
host: ${main_domain}
|
||||
|
||||
env:
|
||||
REDIS_URL: "redis://unsend-redis-prod:6379"
|
||||
POSTGRES_USER: "postgres"
|
||||
POSTGRES_PASSWORD: "postgres"
|
||||
POSTGRES_DB: "unsend"
|
||||
DATABASE_URL: "postgresql://postgres:postgres@unsend-db-prod:5432/unsend"
|
||||
NEXTAUTH_URL: "http://localhost:3000"
|
||||
NEXTAUTH_SECRET: ${secret_base}
|
||||
GITHUB_ID: "'Fill'"
|
||||
GITHUB_SECRET: "'Fill'"
|
||||
AWS_DEFAULT_REGION: "us-east-1"
|
||||
AWS_SECRET_KEY: "'Fill'"
|
||||
AWS_ACCESS_KEY: "'Fill'"
|
||||
DOCKER_OUTPUT: "1"
|
||||
API_RATE_LIMIT: "1"
|
||||
DISCORD_WEBHOOK_URL: ""
|
||||
|
||||
mounts: []
|
||||
Reference in New Issue
Block a user