Suggestions for running ActivePieces on Fly?

If anyone has got ActivePieces running on Fly.io, I’d love some pointers. There is a one-click Railway deploy, so I’m guessing it ought to be doable in Fly as well, but when deploying, logs are giving me this error as the database is being populated:

[info]Migration "PieceMetadata1685537054805" failed, error: current database's encoding is not supported with this provider

Here are the steps I took:

  1. fly pg create and copy the postgres connection string.

  2. launch an app for ActivePieces with the following fly.toml

[build]
image = 'activepieces/activepieces:latest'

[env]
AP_DB_TYPE = 'POSTGRES'
AP_ENGINE_EXECUTABLE_PATH = 'dist/packages/engine/main.js'
AP_ENVIRONMENT = 'prod'
AP_EXECUTION_MODE = 'UNSANDBOXED'
AP_FRONTEND_URL = 'http://localhost:8080'
AP_QUEUE_MODE = 'MEMORY'
AP_SANDBOX_RUN_TIME_SECONDS = '600'
AP_TELEMETRY_ENABLED = 'false'
AP_TRIGGER_DEFAULT_POLL_INTERVAL = '5'
AP_WEBHOOK_TIMEOUT_SECONDS = '30'

[http_service]
internal_port = 4200
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 1

[http_service.concurrency]
type = 'requests'
hard_limit = 250
soft_limit = 200

[[vm]]
memory = '512mb'
cpu_kind = 'shared'
cpus = 1
  1. setting some secrets:
fly secrets set \
  AP_API_KEY=$(openssl rand -hex 64) \
  AP_JWT_SECRET=$(openssl rand -hex 32) \
  ENCRYPTION_KEY=$(openssl rand -hex 16) \
  AP_POSTGRES_URL=<postgres connection string>
  1. deploy

Clearly something is going on with the database connection, but I’m unable to troubleshoot it.

ActivePieces environment variables doc is here

Note: ActivePieces normally uses Redis, and I’m planning on using that eventually, but it can be used without Redis with the environment variable AP_QUEUE_MODE = MEMORY. I haven’t been able to get around the error I mentioned with or without Redis.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.