tombh / peas

Docker and Ruby based PaaS
GNU General Public License v2.0
601 stars 33 forks source link

Build from docker-compose #29

Closed cpursley closed 9 years ago

cpursley commented 9 years ago

This is a great project. Is there any interest in adding the option to build from a docker-compose.yml file instead of buildstep the way https://github.com/project-nsmg/figure does?

tombh commented 9 years ago

Thanks. That's interesting, I hadn't consider that. How would manage scaling a web container, say if you wanted more then one web: process?

My feeling is that this isn't quite the direction I want Peas to take. Right now I'm thinking that Peas shouldn't have any responsibility for non-web infrastructure like databases. Basically I'm trying to solve just the one problem of deploying and scaling the application layer. I'm imagining that managing the persistence layer could be done by something else. Perhaps even done by hand as Peas isn't primarily aimed at enterprise level apps.

cpursley commented 9 years ago

I am thinking with docker-compose as the base, it could handle scaling like: docker-compose scale web=3

cpursley commented 9 years ago

I'm with you on the db layer. In production I plan to use either aws or herkou's postgresql (Rails app).

tombh commented 9 years ago

I didn't know that! I should look into it more closely. Right, I can see why you suggested it now.

A couple of things that spring to mind:

How does it work with multiple apps? Would we have to define each individual app as a new key in the yaml or would there be separate config files?

How does it work across servers? Say if I have 3 servers and I want some 5 web containers on each server.

Thanks!

cpursley commented 9 years ago

@tombh ~ All that makes sense. I've been thinking thorough this and what it comes down to is the ability to build from a Dockerfile (not necessarily fig/docker-compose.yml). Looks like dokku-alt has this option. Regarding scaling across servers - not sure. Seems like that's where deis or flynn begin to make sense.

cpursley commented 9 years ago

If this is not the direction you're interested in going, feel free to close. Just me thinking out loud.

tombh commented 9 years ago

Well I'm actually considering building Peas itself from docker-compose so it is useful.

I've also realised now that I need to completely rewrite Peas to use Swarm!

cpursley commented 9 years ago

That seems like a practical way to go about it - wrap the tooling around Docker's official tools.