Partial deployments (fly.io)

Hello - We use fly.io and are in going through the HIPAA compliance process so need to move to a self-hosted retool. Our app is on fly.io which lets you deploy a Dockerfile, but it does not support docker-compose.

We don't use the retool database or the job runner or workflows, etc. Our API is the only data source. I'm wondering if we can do a simplified deployment.

Anyone have any experience doing this?

2 Likes

Hey @kc1! Thanks for dropping by our Community office hours last week. I'll reiterate for the sake of those who weren't there that this is definitely possible, although it's not specifically something that I've done before.

The typical Docker deployment, minus Temporal, is based entirely off of two images - backend and code-executor-service - and only the first of these is strictly necessary if you won't be using workflows.

We generally recommend running multiple copies of this image as separate containers in order to scale different services, but it's technically optional. When spinning up a container, we can specify which services it is responsible for by setting the SERVICE_TYPE environment variable.

Ultimately, all of the above means that you can deploy Retool as a single container based on the backend image with a SERVICE_TYPE environment variable set to MAIN_BACKEND,DB_CONNECTOR,DB_SSH_CONNECTOR,J0BS_RUNNER. Note that JOBS_RUNNER is a mandatory service, as it handles migrations for the primary Retool database.

The last piece of the puzzle is pointing your container towards an external PostgreSQL database via the environment variables in your docker.env file, whether that is a separate fly.io app or something on AWS.

Give that a shot and let me know if you run into any additional challenges!

1 Like