fix: ActivePieces ENV

This commit is contained in:
DrMxrcy 2024-11-13 04:26:21 -05:00
parent 82afd486da
commit 7bef3a0c29
2 changed files with 23 additions and 4 deletions

View File

@ -19,6 +19,17 @@ services:
- AP_POSTGRES_PORT=5432
- AP_REDIS_HOST=redis
- AP_REDIS_PORT=6379
- AP_ENVIRONMENT=prod
- AP_FRONTEND_URL=https://${AP_HOST}
- AP_ENCRYPTION_KEY=${AP_ENCRYPTION_KEY}
- AP_JWT_SECRET=${AP_JWT_SECRET}
- AP_ENGINE_EXECUTABLE_PATH=dist/packages/engine/main.js
- AP_EXECUTION_MODE=UNSANDBOXED
- AP_WEBHOOK_TIMEOUT_SECONDS=30
- AP_TRIGGER_DEFAULT_POLL_INTERVAL=5
- AP_FLOW_TIMEOUT_SECONDS=600
- AP_TELEMETRY_ENABLED=true
- AP_TEMPLATES_SOURCE_URL="https://cloud.activepieces.com/api/v1/flow-templates"
postgres:
image: postgres:14.4

View File

@ -2,13 +2,19 @@ import {
type DomainSchema,
type Schema,
type Template,
generatePassword,
generateBase64,
generateRandomDomain,
} from "../utils";
export function generate(schema: Schema): Template {
const mainDomain = generateRandomDomain(schema);
const postgresPassword = generatePassword();
const apiKey = generateBase64(48);
const postgresPassword = generateBase64(24);
const jwtSecret = generateBase64(24);
const encryptionKey = generateBase64(12);
const postgresUser = "activepieces";
const postgresDb = "activepieces";
@ -24,8 +30,10 @@ export function generate(schema: Schema): Template {
`AP_POSTGRES_DATABASE=${postgresDb}`,
`AP_POSTGRES_PASSWORD=${postgresPassword}`,
`AP_POSTGRES_USERNAME=${postgresUser}`,
`AP_POSTGRES_PORT=5432`,
`AP_REDIS_PORT=6379`,
`AP_HOST=${mainDomain}`,
`AP_API_KEY=${apiKey}`,
`AP_ENCRYPTION_KEY=${encryptionKey}`,
`AP_JWT_SECRET=${jwtSecret}`,
];
return {