Deploy with existing docker files in the project

Hi all,
With rails project.
I have a docker file named, I also have a docker-compose.yml file in my project. So when I run the command fly launch, what do I do to fly deploy with my existing dockerfiles in the project? I couldn’t find any relevant documentation. :sleepy:

Ah. Well unfortunately that won’t work out of the box as Fly does not support docker-compose. But the good news is it does indeed support Dockerfile. Indeed the CLI looks for one to tell it how to build an image. That’s the default name but you can name your file something else, as it seems you have:

So you would normally have one Dockerfile per app. It can make life simpler to have one app per “thing” like one app for your database, one app for your cache (e.g redis), one for your web code. And so on, depending what you need. The exception would often be something like nginx as that is usually just used a proxy which sits in front of your code and so does not need its own app. For example nginx+php-fpm, all in one.

It sounds like that is what you may want and so you can run multiple processes inside one Fly app. If so, you may want to look at something like supervisor to keep both running (one vm). Fly also have a processes section (multiple vms). I’d take a look at their excellent guide which explains it all:

If you get stuck, maybe post your docker-compose file and/or explain how you need it structured/translated. Someone will be able to assist :slight_smile: