From 06af2042ee372cb29e9c0970608f7935ef900810 Mon Sep 17 00:00:00 2001 From: DrMxrcy Date: Wed, 13 Nov 2024 05:06:42 -0500 Subject: [PATCH] fix: Testing ENV Variables --- apps/dokploy/templates/activepieces/index.ts | 14 +++++++++----- apps/dokploy/templates/chatwoot/docker-compose.yml | 11 ++++++++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/apps/dokploy/templates/activepieces/index.ts b/apps/dokploy/templates/activepieces/index.ts index 8757e83e..c15f3f78 100644 --- a/apps/dokploy/templates/activepieces/index.ts +++ b/apps/dokploy/templates/activepieces/index.ts @@ -9,14 +9,18 @@ import { export function generate(schema: Schema): Template { const mainDomain = generateRandomDomain(schema); - const apiKey = generateBase64(48); - const postgresPassword = generateBase64(24); - const jwtSecret = generateBase64(24); - const encryptionKey = generateBase64(12); - const redisPassword = generateBase64(24); + const apiKey = Array.from({length: 64}, () => + Math.floor(Math.random() * 16).toString(16)).join(''); + const postgresPassword = Array.from({length: 32}, () => + Math.floor(Math.random() * 16).toString(16)).join(''); + const jwtSecret = Array.from({length: 32}, () => + Math.floor(Math.random() * 16).toString(16)).join(''); + const encryptionKey = Array.from({length: 16}, () => + Math.floor(Math.random() * 16).toString(16)).join(''); const postgresUser = "activepieces"; const postgresDb = "activepieces"; + const redisPassword = generateBase64(24); const domains: DomainSchema[] = [ { diff --git a/apps/dokploy/templates/chatwoot/docker-compose.yml b/apps/dokploy/templates/chatwoot/docker-compose.yml index 3edf2338..d55ae7a1 100644 --- a/apps/dokploy/templates/chatwoot/docker-compose.yml +++ b/apps/dokploy/templates/chatwoot/docker-compose.yml @@ -1,6 +1,13 @@ version: "3.8" services: + base: &base + image: chatwoot/chatwoot:v3.14.1 + networks: + - dokploy-network + volumes: + - storage_data:/app/storage + postgres: image: postgres:12 networks: @@ -33,9 +40,7 @@ services: restart: always setup: - image: chatwoot/chatwoot:v3.14.1 - networks: - - dokploy-network + <<: *base environment: - NODE_ENV=production - RAILS_ENV=production