mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: AP Env Testing
This commit is contained in:
@@ -2,7 +2,7 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
activepieces:
|
activepieces:
|
||||||
image: ghcr.io/activepieces/activepieces:0.35.0
|
image: activepieces/activepieces:0.35.0
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- dokploy-network
|
- dokploy-network
|
||||||
@@ -12,67 +12,55 @@ services:
|
|||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- AP_DB_TYPE=POSTGRES
|
AP_ENGINE_EXECUTABLE_PATH: dist/packages/engine/main.js
|
||||||
- AP_POSTGRES_DATABASE=${AP_POSTGRES_DATABASE}
|
AP_API_KEY: ${AP_API_KEY}
|
||||||
- AP_POSTGRES_PASSWORD=${AP_POSTGRES_PASSWORD}
|
AP_ENCRYPTION_KEY: ${AP_ENCRYPTION_KEY}
|
||||||
- AP_POSTGRES_USERNAME=${AP_POSTGRES_USERNAME}
|
AP_JWT_SECRET: ${AP_JWT_SECRET}
|
||||||
- AP_POSTGRES_HOST=postgres
|
AP_ENVIRONMENT: prod
|
||||||
- AP_POSTGRES_PORT=5432
|
AP_FRONTEND_URL: https://${AP_HOST}
|
||||||
- AP_POSTGRES_USE_SSL=false
|
AP_WEBHOOK_TIMEOUT_SECONDS: 30
|
||||||
- AP_QUEUE_MODE=REDIS
|
AP_TRIGGER_DEFAULT_POLL_INTERVAL: 5
|
||||||
- AP_REDIS_HOST=redis
|
AP_POSTGRES_DATABASE: activepieces
|
||||||
- AP_REDIS_PORT=6379
|
AP_POSTGRES_HOST: postgres
|
||||||
- AP_REDIS_PASSWORD=${AP_REDIS_PASSWORD}
|
AP_POSTGRES_PORT: 5432
|
||||||
- AP_REDIS_DB=0
|
AP_POSTGRES_USERNAME: activepieces
|
||||||
- AP_REDIS_USE_SSL=false
|
AP_POSTGRES_PASSWORD: ${AP_POSTGRES_PASSWORD}
|
||||||
- AP_ENVIRONMENT=prod
|
AP_EXECUTION_MODE: UNSANDBOXED
|
||||||
- AP_FRONTEND_URL=https://${AP_HOST}
|
AP_REDIS_HOST: redis
|
||||||
- AP_ENCRYPTION_KEY=${AP_ENCRYPTION_KEY}
|
AP_REDIS_PORT: 6379
|
||||||
- AP_JWT_SECRET=${AP_JWT_SECRET}
|
AP_SANDBOX_RUN_TIME_SECONDS: 600
|
||||||
- AP_ENGINE_EXECUTABLE_PATH=dist/packages/engine/main.js
|
AP_TELEMETRY_ENABLED: "false"
|
||||||
- AP_EXECUTION_MODE=UNSANDBOXED
|
AP_TEMPLATES_SOURCE_URL: https://cloud.activepieces.com/api/v1/flow-templates
|
||||||
- AP_FLOW_WORKER_CONCURRENCY=10
|
|
||||||
- AP_SCHEDULED_WORKER_CONCURRENCY=10
|
|
||||||
- AP_TELEMETRY_ENABLED=false
|
|
||||||
- AP_PIECES_SOURCE=DB
|
|
||||||
- AP_PIECES_SYNC_MODE=OFFICIAL_AUTO
|
|
||||||
- AP_WEBHOOK_TIMEOUT_SECONDS=30
|
|
||||||
- AP_TRIGGER_DEFAULT_POLL_INTERVAL=5
|
|
||||||
- AP_FLOW_TIMEOUT_SECONDS=600
|
|
||||||
- AP_EXECUTION_DATA_RETENTION_DAYS=30
|
|
||||||
- AP_PROJECT_RATE_LIMITER_ENABLED=true
|
|
||||||
- AP_MAX_CONCURRENT_JOBS_PER_PROJECT=100
|
|
||||||
- AP_FILE_STORAGE_LOCATION=DB
|
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:14.4
|
image: postgres:14
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- dokploy-network
|
- dokploy-network
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=${AP_POSTGRES_DATABASE}
|
POSTGRES_DB: activepieces
|
||||||
- POSTGRES_PASSWORD=${AP_POSTGRES_PASSWORD}
|
POSTGRES_PASSWORD: ${AP_POSTGRES_PASSWORD}
|
||||||
- POSTGRES_USER=${AP_POSTGRES_USERNAME}
|
POSTGRES_USER: activepieces
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${AP_POSTGRES_USERNAME}"]
|
test: ["CMD-SHELL", "pg_isready -U activepieces -d activepieces"]
|
||||||
interval: 10s
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 30s
|
||||||
retries: 5
|
retries: 3
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:7.0.7
|
image: redis:7
|
||||||
command: redis-server --requirepass ${AP_REDIS_PASSWORD}
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- dokploy-network
|
- dokploy-network
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- redis_data:/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "redis-cli", "-a", "${AP_REDIS_PASSWORD}", "ping"]
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
interval: 10s
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 30s
|
||||||
retries: 5
|
retries: 3
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
|
|||||||
@@ -8,17 +8,14 @@ import {
|
|||||||
export function generate(schema: Schema): Template {
|
export function generate(schema: Schema): Template {
|
||||||
const mainDomain = generateRandomDomain(schema);
|
const mainDomain = generateRandomDomain(schema);
|
||||||
|
|
||||||
const encryptionKey = Array.from({length: 16}, () =>
|
const apiKey = Array.from({length: 32}, () =>
|
||||||
|
Math.floor(Math.random() * 16).toString(16)).join('');
|
||||||
|
const encryptionKey = Array.from({length: 32}, () =>
|
||||||
Math.floor(Math.random() * 16).toString(16)).join('');
|
Math.floor(Math.random() * 16).toString(16)).join('');
|
||||||
const jwtSecret = Array.from({length: 32}, () =>
|
const jwtSecret = Array.from({length: 32}, () =>
|
||||||
Math.floor(Math.random() * 16).toString(16)).join('');
|
Math.floor(Math.random() * 16).toString(16)).join('');
|
||||||
const postgresPassword = Array.from({length: 32}, () =>
|
const postgresPassword = Array.from({length: 32}, () =>
|
||||||
Math.floor(Math.random() * 16).toString(16)).join('');
|
Math.floor(Math.random() * 16).toString(16)).join('');
|
||||||
const redisPassword = Array.from({length: 32}, () =>
|
|
||||||
Math.floor(Math.random() * 16).toString(16)).join('');
|
|
||||||
|
|
||||||
const postgresUser = "activepieces";
|
|
||||||
const postgresDb = "activepieces";
|
|
||||||
|
|
||||||
const domains: DomainSchema[] = [
|
const domains: DomainSchema[] = [
|
||||||
{
|
{
|
||||||
@@ -30,13 +27,10 @@ export function generate(schema: Schema): Template {
|
|||||||
|
|
||||||
const envs = [
|
const envs = [
|
||||||
`AP_HOST=${mainDomain}`,
|
`AP_HOST=${mainDomain}`,
|
||||||
`AP_FRONTEND_URL=https://${mainDomain}`,
|
`AP_API_KEY=${apiKey}`,
|
||||||
`AP_ENCRYPTION_KEY=${encryptionKey}`,
|
`AP_ENCRYPTION_KEY=${encryptionKey}`,
|
||||||
`AP_JWT_SECRET=${jwtSecret}`,
|
`AP_JWT_SECRET=${jwtSecret}`,
|
||||||
`AP_POSTGRES_DATABASE=${postgresDb}`,
|
|
||||||
`AP_POSTGRES_PASSWORD=${postgresPassword}`,
|
`AP_POSTGRES_PASSWORD=${postgresPassword}`,
|
||||||
`AP_POSTGRES_USERNAME=${postgresUser}`,
|
|
||||||
`AP_REDIS_PASSWORD=${redisPassword}`,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user