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:
parent
6866c3b116
commit
a5c1f8ef49
@ -2,7 +2,7 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
activepieces:
|
||||
image: ghcr.io/activepieces/activepieces:0.35.0
|
||||
image: activepieces/activepieces:0.35.0
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dokploy-network
|
||||
@ -12,67 +12,55 @@ services:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- AP_DB_TYPE=POSTGRES
|
||||
- AP_POSTGRES_DATABASE=${AP_POSTGRES_DATABASE}
|
||||
- AP_POSTGRES_PASSWORD=${AP_POSTGRES_PASSWORD}
|
||||
- AP_POSTGRES_USERNAME=${AP_POSTGRES_USERNAME}
|
||||
- AP_POSTGRES_HOST=postgres
|
||||
- AP_POSTGRES_PORT=5432
|
||||
- AP_POSTGRES_USE_SSL=false
|
||||
- AP_QUEUE_MODE=REDIS
|
||||
- AP_REDIS_HOST=redis
|
||||
- AP_REDIS_PORT=6379
|
||||
- AP_REDIS_PASSWORD=${AP_REDIS_PASSWORD}
|
||||
- AP_REDIS_DB=0
|
||||
- AP_REDIS_USE_SSL=false
|
||||
- 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_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
|
||||
AP_ENGINE_EXECUTABLE_PATH: dist/packages/engine/main.js
|
||||
AP_API_KEY: ${AP_API_KEY}
|
||||
AP_ENCRYPTION_KEY: ${AP_ENCRYPTION_KEY}
|
||||
AP_JWT_SECRET: ${AP_JWT_SECRET}
|
||||
AP_ENVIRONMENT: prod
|
||||
AP_FRONTEND_URL: https://${AP_HOST}
|
||||
AP_WEBHOOK_TIMEOUT_SECONDS: 30
|
||||
AP_TRIGGER_DEFAULT_POLL_INTERVAL: 5
|
||||
AP_POSTGRES_DATABASE: activepieces
|
||||
AP_POSTGRES_HOST: postgres
|
||||
AP_POSTGRES_PORT: 5432
|
||||
AP_POSTGRES_USERNAME: activepieces
|
||||
AP_POSTGRES_PASSWORD: ${AP_POSTGRES_PASSWORD}
|
||||
AP_EXECUTION_MODE: UNSANDBOXED
|
||||
AP_REDIS_HOST: redis
|
||||
AP_REDIS_PORT: 6379
|
||||
AP_SANDBOX_RUN_TIME_SECONDS: 600
|
||||
AP_TELEMETRY_ENABLED: "false"
|
||||
AP_TEMPLATES_SOURCE_URL: https://cloud.activepieces.com/api/v1/flow-templates
|
||||
|
||||
postgres:
|
||||
image: postgres:14.4
|
||||
image: postgres:14
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dokploy-network
|
||||
environment:
|
||||
- POSTGRES_DB=${AP_POSTGRES_DATABASE}
|
||||
- POSTGRES_PASSWORD=${AP_POSTGRES_PASSWORD}
|
||||
- POSTGRES_USER=${AP_POSTGRES_USERNAME}
|
||||
POSTGRES_DB: activepieces
|
||||
POSTGRES_PASSWORD: ${AP_POSTGRES_PASSWORD}
|
||||
POSTGRES_USER: activepieces
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${AP_POSTGRES_USERNAME}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
test: ["CMD-SHELL", "pg_isready -U activepieces -d activepieces"]
|
||||
interval: 30s
|
||||
timeout: 30s
|
||||
retries: 3
|
||||
|
||||
redis:
|
||||
image: redis:7.0.7
|
||||
command: redis-server --requirepass ${AP_REDIS_PASSWORD}
|
||||
image: redis:7
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dokploy-network
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "-a", "${AP_REDIS_PASSWORD}", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 30s
|
||||
timeout: 30s
|
||||
retries: 3
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
@ -8,17 +8,14 @@ import {
|
||||
export function generate(schema: Schema): Template {
|
||||
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('');
|
||||
const jwtSecret = Array.from({length: 32}, () =>
|
||||
Math.floor(Math.random() * 16).toString(16)).join('');
|
||||
const postgresPassword = Array.from({length: 32}, () =>
|
||||
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[] = [
|
||||
{
|
||||
@ -30,13 +27,10 @@ export function generate(schema: Schema): Template {
|
||||
|
||||
const envs = [
|
||||
`AP_HOST=${mainDomain}`,
|
||||
`AP_FRONTEND_URL=https://${mainDomain}`,
|
||||
`AP_API_KEY=${apiKey}`,
|
||||
`AP_ENCRYPTION_KEY=${encryptionKey}`,
|
||||
`AP_JWT_SECRET=${jwtSecret}`,
|
||||
`AP_POSTGRES_DATABASE=${postgresDb}`,
|
||||
`AP_POSTGRES_PASSWORD=${postgresPassword}`,
|
||||
`AP_POSTGRES_USERNAME=${postgresUser}`,
|
||||
`AP_REDIS_PASSWORD=${redisPassword}`,
|
||||
];
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user