Hi! I’m a beginner and not so technical.
I thought it should be easy to deploy a Docker stack but I’m seeing it’s difficult.
I thought Fly would fetch my Dockerfile, dotenv and Docker-compose.yml and build it all from there. Then I realized you should built it from the toml file.
Looks like Fly isn’t following the base Docker stack files, so not easy to setup. My stack has 4 images that work together but I don’t know how to set it up properly.
In a regular VPS I Docker compose up and it works out of the box. I want to learn how to set up here.
if you were setting this up to run at scale you’d want a different app for each entry in your compose file (an app for API, one for mongo, one for mellisearch, one for postgres and one for your RAG). or you could use SaaS offerings for postgres and mongo if you didn’t want to run them yourself (you might be able to find someone running mellisearch).
it’s not clear from your two compose files while there’s rag_api and postgres twice, that seems like it might be an error?
also, unrelated, but I’m definitely curious why mongo, mellisearch, and postgres are getting used, there’s a not-insignificant overlap between those three tools
I see what you say about one app for each entry. Based on that I’m wondering, wouldn’t that more difficult to set and more expansive than deploying composing it up at any regular VPS or even Railway or Render. I’m new to Fly.io and not advanced technically. I just want to deploy a compose Docker app for low cost in the beginning and be able to scale it up with great performance in the near future.
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).
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
Thank you very much for your response.
I’m trying to deploy an application that is already fully packaged in Docker.
Nowadays, almost everything is in Docker.
I, in my naivety, thought using fly would be as simple as it seems on the website and in the docs. I like the philosophy of fly; it seems they’re offering something unique, but far from simple. I assume that fly has users with various levels of technical knowledge. Still, I find the documentation insufficient. Also, the forum here isn’t very active. You can see that only one person has responded to me.
However, I’ll follow your instructions and try to deploy here.