I’m attempting (and failing) to run Activepieces in fly.io, and would be grateful if anyone has suggestions. (I saw that there’s a one-click deployment for Railway, so I’m assuming it must be possible on Fly as well.
I’m running into this issue on deploy:
[info]Migration "PieceMetadata1685537054805" failed, error: current database's encoding is not supported with this provider
Here are the steps I took:
fly pg create and copy the postgres connection string.
launch an app for ActivePieces with the following fly.toml
The deployment starts, and the database begins to be set up (15-20 lines of successful database transactions in the log), and then the error I mentioned at the beginning of this post appears, and deployment can’t continue. I’m unsure of how to proceed.
The Postgres database that Fly sets up has SQL_ASCII encoding and I believe ActivePieces requires UTF8. I successfully followed these instructions to alter the database to UTF8, but afterwards, the console returned the same error. I think it might have something to do with ICU, but I’m out of my depth.
I was informed by Fly.io support that their postgres-flex image has been upgraded to Postgres 16, and with that change, the default encoding switched from UTF8 to SQL_ASCII.
I don’t know whether that encoding change is specific to Fly’s image, but given these lines from the Postgres 16 release notes…
Determine the default encoding from the locale when using ICU (Jeff Davis)
Previously the default was always UTF-8.
…I’m guessing that this might apply more generally?
In any case—for now, for those wishing to run ActivePieces on Fly, provision the Postgres app with fly postgres create --image-ref flyio/postgres-flex:15, which will use Fly’s Postgres 15 postgres-flex image, whose default encoding is UTF8.
Today I got a reply from Fly.io that they’ve made a change so that now new Postgres apps will deploy with the UTF8 encoding and the latest Postgres (16 as of now):
Good news, it turns out this was a quick fix! Newly provisioned postgres-flex clusters are back to using UTF-8 encoding as the default. Existing clusters that were provisioned with the SQL_ASCII encoding will stay with that, but new clusters will use UTF-8 again.
Thanks for bringing this to our attention.
I can confirm that I’m now running on Postgres 16, and there’s no longer any need to specify a specific Postgres image when deploying ActivePieces on Fly.