I’ve got a docker-compose which runs all our services. We run an app with users in 30+ countries. It’s Sept. 22, do we have a better support for docker-compose?
Trying to wrap my head around running each service in the docker-compose independently.
Please see my current docker-compose attached
nginxservice serves as our reverse proxy
apiservice has 4 instances (nodejs, express, apollo-server e.t.c)
dbservice – using postgres image
redis-masterservice – using
redis-replicaservice – using
- A bunch of environment variables attached via
So I’m looking at the following workflow, please correct me if I’m mistaken:
- Convert the docker-compose instance into separate dockerfiles and keep different
- For the Node Express service i.e (
api), according to my docker compose, I’ll have that in one dockerfile with its environment variables and a separate fly app.
- For the nginx service, another separate fly app and its own dockerfile
- I have AWS RDS instance which I can move over to fly postgres cluster to replace the
dbservice and pass the connection string.
- I have redis-master and redis-replica which I can move over to fly redis (though not sure how to setup the master/slave on fly)
- Are there any other recommendation to ensure this is a performant, yet cost effective setup?
- Latency is a massive issue which is why we’re looking to migrate to fly.io. How can we scale our
api(graphql) and postgresql instances to better serve our users?
- Any thought on how to manage environment variables in fly.toml? Can I just copy the
.envsection in the docker-compose and add to
fly.tomlfile instance of an app?
- Regarding cost, looking at the description above, will the monthly cost likely to be significant? We are bootstrapping and paying for services out-of-pocket atm so every little help