Docker-compose.yml to fly.toml

I think Render would be a similar experience to fly, there’d be a translation step you’d need to do to spin up the various containers vs using your existing docker-compose file.

you can run docker and docker-compose in a fly vm (see this comment about running docker in firecracker) but i don’t know what hiccups you’ll run into, and it’s doing things the hard way (I know that seems a little counter-intuitive) the approach there would be that you’d install docker and docker-compose into your Dockerfile and whatever else was needed to use docker. then your CMD (or entrypoint) would be a docker-compose up command. ideally your image build would download the correct images for all of your dependencies but i’m not sure what issues you’d run into doing that.

stepping back for a moment, if I were approaching this as you (I’m making some assumptions) I would look into hosted versions of postgres, mongo, and meilisearch when running these in production.

your expertise isn’t in running these services and while fly has good high availability configs for postgres it takes some expertise to run at scale (and if you look through the forums you’ll see there’s a big of an expectation mismatch from people thinking the high-availability fly postgres configs are the same as something like Supabase, Heroku Postgres, RDS, or Digital Ocean’s managed Postgres).

supabase has a postgres available with fly Supabase Postgres · Fly Docs

talking about price, running each of those services on fly as separate apps is going to be more expensive than a $4/mo digital ocean droplet (though it’s possible to run them with docker-compose). the droplet will be pretty easy to get docker-compose setup. that said, “RAG” is one of the services you’re talking about and if you’re generating vector embeddings on the host, a $4 droplet isn’t going to cut it (neither with a shared-1x cpu machine from fly).

at some point you’ll want these all as separately managed services (perhaps not right now) and when that happens i’d expect fly to be compelling on price and developer experience. the question is whether you’d want to spend that effort to split things up now or later

1 Like