arachnys / cabot

Self-hosted, easily-deployable monitoring and alerts service - like a lightweight PagerDuty
MIT License
5.59k stars 593 forks source link

Dokku #3

Closed jbrooksuk closed 10 years ago

jbrooksuk commented 10 years ago

Dokku uses Docker to create containers very quickly. Since the port is variable, how can I change the configuration to use the env variable of PORT?

dbuxton commented 10 years ago

Not sure I understand the question - I've looked at Dokku a while back but not recently.

If you're asking (as I think you are) how to make sure that the env variable used is not whatever you specify in conf/production.env but whatever Dokku/Docker gives you, I guess you'd want to sub it in to the upstart config that we create in fabfile.py: https://github.com/arachnys/cabot/blob/master/fabfile.py#L58

I'd love for someone to write a Docker deployment script for Cabot, if you do so make sure to send me a link and I'll add to the docs.

bsdlp commented 10 years ago

hey, does this mean there is a dockerfile being written for cabot? If not, I would be more than happy to help write one.

dbuxton commented 10 years ago

There isn't one yet, but if you come up with one I'll be sure to link to it/maintain it alongside the project. I'm not the right person to start work on it.

There's pretty detailed setup instructions/dependencies in https://github.com/arachnys/cabot/blob/master/bin/setup_dependencies.sh and https://github.com/arachnys/cabot/blob/master/fabfile.py. Let me know if you need anything else to make a start.

GermanDZ commented 10 years ago

I am interested in create a "dockered" version of cabot. Probably we will need many docker containers, to have only one process per container.

Feel free to contact me to coordinate efforts.

dbuxton commented 10 years ago

@GermanDZ that sounds great. At the moment we have the following:

  1. Web process
  2. Worker process (it's probably necessary to break out celerybeat into its own process though for this)
  3. Redis server
  4. Postgres server

I assume that there are off-the-shelf images for (3) and (4) we can use. Doing (1) and (2) shouldn't be too hard either, it's the same as for any Django app.

I notice that some similar efforts for other projects have just shoved everything inside a single container: see https://github.com/ekalinin/docker-sentry-postgres for example. It doesn't sound very pretty but could be appropriate for something quite small and self-contained like Cabot.

If we wanted to go down that route, perhaps it's easiest for you to create a repo and I'll link to it from the docs?

bbonf commented 10 years ago

Hi, I started working on it, but it's not ready yet: https://github.com/bbonf/docker-cabot

shoonoise commented 10 years ago

There is my implementation of Docker image for Cabot.

dbuxton commented 10 years ago

thanks @shoonoise - I've added something to the README, will add to cabotapp.com too in due course.