mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
add extra env
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { Secrets } from "@/components/ui/secrets";
|
||||||
import {
|
import {
|
||||||
type DomainSchema,
|
type DomainSchema,
|
||||||
type Schema,
|
type Schema,
|
||||||
@@ -8,8 +9,13 @@ import {
|
|||||||
|
|
||||||
export function generate(schema: Schema): Template {
|
export function generate(schema: Schema): Template {
|
||||||
const triggerDomain = generateRandomDomain(schema);
|
const triggerDomain = generateRandomDomain(schema);
|
||||||
|
|
||||||
|
const magicLinkSecret = generateBase64(16);
|
||||||
|
const sessionSecret = generateBase64(16);
|
||||||
|
const encryptionKey = generateBase64(32);
|
||||||
const providerSecret = generateBase64(32);
|
const providerSecret = generateBase64(32);
|
||||||
const coordinatorSecret = generateBase64(32);
|
const coordinatorSecret = generateBase64(32);
|
||||||
|
|
||||||
const dbPassword = generateBase64(24);
|
const dbPassword = generateBase64(24);
|
||||||
const dbUser = "triggeruser";
|
const dbUser = "triggeruser";
|
||||||
const dbName = "triggerdb";
|
const dbName = "triggerdb";
|
||||||
@@ -23,30 +29,56 @@ export function generate(schema: Schema): Template {
|
|||||||
];
|
];
|
||||||
|
|
||||||
const envs = [
|
const envs = [
|
||||||
|
`NODE_ENV=production`,
|
||||||
|
`RUNTIME_PLATFORM=docker-compose`,
|
||||||
|
`V3_ENABLED=true`,
|
||||||
|
|
||||||
|
// Trigger configuration
|
||||||
|
`TRIGGER_DOMAIN=${triggerDomain}`,
|
||||||
|
`TRIGGER_PROTOCOL=http`,
|
||||||
|
|
||||||
// Database configuration with secure credentials
|
// Database configuration with secure credentials
|
||||||
`POSTGRES_USER=${dbUser}`,
|
`POSTGRES_USER=${dbUser}`,
|
||||||
`POSTGRES_PASSWORD=${dbPassword}`,
|
`POSTGRES_PASSWORD=${dbPassword}`,
|
||||||
`POSTGRES_DB=${dbName}`,
|
`POSTGRES_DB=${dbName}`,
|
||||||
`DATABASE_URL=postgresql://${dbUser}:${dbPassword}@postgres:5432/${dbName}`,
|
`DATABASE_URL=postgresql://${dbUser}:${dbPassword}@postgres:5432/${dbName}`,
|
||||||
|
|
||||||
// Trigger configuration
|
// Secrets
|
||||||
`TRIGGER_DOMAIN=${triggerDomain}`,
|
`MAGIC_LINK_SECRET=${magicLinkSecret}`,
|
||||||
"TRIGGER_PROTOCOL=http",
|
`SESSION_SECRET=${sessionSecret}`,
|
||||||
|
`ENCRYPTION_KEY=${encryptionKey}`,
|
||||||
// Secrets for services
|
|
||||||
`PROVIDER_SECRET=${providerSecret}`,
|
`PROVIDER_SECRET=${providerSecret}`,
|
||||||
`COORDINATOR_SECRET=${coordinatorSecret}`,
|
`COORDINATOR_SECRET=${coordinatorSecret}`,
|
||||||
|
|
||||||
// Optional configurations with defaults
|
`# TRIGGER_TELEMETRY_DISABLED=1`,
|
||||||
"TRIGGER_IMAGE_TAG=v3",
|
`INTERNAL_OTEL_TRACE_DISABLED=1`,
|
||||||
"POSTGRES_IMAGE_TAG=16",
|
`INTERNAL_OTEL_TRACE_LOGGING_ENABLED=0`,
|
||||||
"REDIS_IMAGE_TAG=7",
|
|
||||||
"ELECTRIC_IMAGE_TAG=latest",
|
|
||||||
"RESTART_POLICY=unless-stopped",
|
|
||||||
|
|
||||||
// Network bindings
|
`DEFAULT_ORG_EXECUTION_CONCURRENCY_LIMIT=300`,
|
||||||
"WEBAPP_PUBLISH_IP=127.0.0.1",
|
`DEFAULT_ENV_EXECUTION_CONCURRENCY_LIMIT=100`,
|
||||||
"DOCKER_PUBLISH_IP=127.0.0.1",
|
|
||||||
|
`# If this is set, emails that are not specified won't be able to log in`,
|
||||||
|
`# WHITELISTED_EMAILS="authorized@yahoo.com|authorized@gmail.com"`,
|
||||||
|
`# Accounts with these emails will become admins when signing up and get access to the admin panel`,
|
||||||
|
`# ADMIN_EMAILS="admin@example.com|another-admin@example.com"`,
|
||||||
|
|
||||||
|
`# If this is set, your users will be able to log in via GitHub`,
|
||||||
|
`# AUTH_GITHUB_CLIENT_ID=`,
|
||||||
|
`# AUTH_GITHUB_CLIENT_SECRET=`,
|
||||||
|
|
||||||
|
`# E-mail settings`,
|
||||||
|
`# Ensure the FROM_EMAIL matches what you setup with Resend.com`,
|
||||||
|
`# If these are not set, emails will be printed to the console`,
|
||||||
|
`# FROM_EMAIL=`,
|
||||||
|
`# REPLY_TO_EMAIL=`,
|
||||||
|
`# RESEND_API_KEY=`,
|
||||||
|
|
||||||
|
`# Worker settings`,
|
||||||
|
`HTTP_SERVER_PORT=9020`,
|
||||||
|
`COORDINATOR_HOST=127.0.0.1`,
|
||||||
|
`COORDINATOR_PORT=\${HTTP_SERVER_PORT}`,
|
||||||
|
`# REGISTRY_HOST=\${DEPLOY_REGISTRY_HOST}`,
|
||||||
|
`# REGISTRY_NAMESPACE=\${DEPLOY_REGISTRY_NAMESPACE}`,
|
||||||
];
|
];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user