-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker Compose Support #5102
Comments
Was searching for a way to setup Dokku with Docker Compose, and stumbled on this issue. Would love to see this come to reality! |
@josegonzalez Hello! Any news on this? This would be FANTASTIC!! Anyway we can help? |
At this point it's mostly time (and funding for my time, see the github sponsors tab!). I have a decent idea of what to do to get this started, and the links above expound on the potential future functionality to drive deployments on ECS, Kubernetes, or Swarm. |
Might be good to also implement the ability to select a |
As much as I don't care what people use on their servers - it's your server, do whatever you want 😀 - this is an issue tracker for the dokku project. Please keep it clear of commentary about other projects in this space. Thanks. |
@josegonzalez Any updates on this? |
If there was an update, it would be posted? |
Hello guys, you might be aware of this, but it can motivate you to push Dokku in this direction: most of the new open-source SaaS (Airbyte, Cube.js...) are deployed either via k8s or docker compose. Managing a k8s is crazy expensive, so if you can provide a seamless deployment of "docker compose" recipes you will resurrect Dokku. PS: I stopped using Dokku when Google Compute Engine instances started to handle containers. |
I don't think this is a problem of motivation, but time. I also don't think Dokku is dead, so it probably doesn't need resurrection. Glad to hear you found a solution that works for you though :) |
For most SaaS there is no easy solution to deploy a docker compose on a VM like Dokku does for containers, that's why you might bring a great one when time will come. Thanks for your awesome work anyway, I'm looking forward to deploy "docker compose" with Dokku when it's available. |
This is very interesting , looking forward to it. |
Thanks for effort on this @josegonzalez - would be a big time-saver to be able to deploy docker compose directly on dokku! In many cases, the compose is just to stand up simple services that are covered well by dokku plugins (e.g. redis, postgres), but when it goes beyond that, figuring out how to represent a compose file on dokku is sometimes a non-trivial effort :) |
I'd love to get Supabase deployed with dokku: https://github.com/supabase/supabase |
Is there something we can do to help moving this forward?
I tried but I eventually installed it with |
@bfontaine apologies for the late reply. There are two paths forward:
The above goes for anyone interested in this or functionality in Dokku :) |
Description of feature
Over the years, there have been a few tickets for docker compose:
As well as an early MR attempt: #1596
I recently - last night when I couldn't sleep - reinvestigated potential support for Compose, and I think we can do it now based on our work with the schedulers plugin as well as the evolution of the compose spec. Here is how it would work:
New plugins
New builder-compose plugin
The
builder-compose
plugin will not auto-detect, and is opt-in. Users will have to do select it to use it.dokku builder:set selected $APP compose
During the build process, we will do the following:
com.dokku.compose=false
.profile
that we use for builds and such.image
for any services with abuild
directive so that the image name ends up beingdokku/$APP:latest-$PROCESS_TYPE
.web
process will end up being taggedlatest
. If there are multiple with the same exact build context, they will share the same tag (with the process type being that ofweb
if that is an option or whatever the first is in lexicographical order).web
process, an alternative labelcom.dokku.primary-image=true
can be specified on a service with abuild
context. This will force that - and any others with the same build context - to be thelatest
label. This is mutually exclusive with aweb
process, and the builder will fail if both are specified.build
directive.docker-compose build
Dokku internals will reference the
latest
image for extracting files or anything (though usually this happens inpost-extract
early on).We should be able to specify the path to a compose file (for monorepo support) separately from selecting the builder via:
This will apply to both the builder and the scheduler.
We can also set buildx support on:
Potential issue is that we can't read and write the yaml file in Golang. I've opened an issue based on this here, so maybe I'm wrong and I'll be able to do this in Go. If not, we'll do the parsing/validation logic in a small python script.
New scheduler-compose plugin
Users will need to opt into this scheduler.
dokku scheduler:set selected $APP compose
This one will take the parsed/validated compose yaml file and run
docker compose up
. A user can specify a compose context to schedule apps to ACI or ECS via a scheduler-compose property:Zero-downtime will be done by using compose's deployment strategies. The naive approach will be just to reload each service in a compose file one by one, which may result in downtime (not sure what compose does, we're just going to be running their commands). A future improvement might be to write our own zero-downtime code (similar to docker-rollout) but that won't be in the initial release. This may result in the proxy not routing to things before it is refreshed until we get to #5101 (but you should be great if you use an alternative proxy layer!), at which point it won't matter :)
Caveats
The above has a few caveats, and we'll consider it experimental going forward. Developers will need to opt into things and new limitations may pop up that I either won't immediately handle or will just be limits of the system. We'll need to make this clear and prominent in the docs.
Nice things
As a side-effect of this, we'll immediately support ACI and ECS, which would give quite a few users the ability to have HA Dokku fairly easily. I think we might even be able to expand this to
kompose
support and have a built-in kubernetes plugin in the future.The text was updated successfully, but these errors were encountered: