mirror of
https://github.com/imputnet/cobalt.git
synced 2026-03-09 07:17:16 -05:00
Omnibus docker setup? #287
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @endigma on GitHub (May 25, 2024).
I see in the self-hosting docs the recommended docker-compose setup has two containers both running the same image with a different port exposed, I don't understand why this isn't just a single image with a different path for API traffic?
This probably already works with something like traefik doing host based routing to the two different ports on the same container, but having this built in would simplify deployments a lot.
If there is a reason why you'd want to run two separate containers, what is it?
@dumbmoron commented on GitHub (May 25, 2024):
the reason for this is that cobalt has two modes: api and web (frontend) - it was split up, so if you want to run a "full" instance you need to run both of them.
the motivation behind that is so that you can run several api instances with only one web instance, and also that the "web"/frontend will eventually become a separately, statically built website that won't require a node.js runtime
@endigma commented on GitHub (May 28, 2024):
Ok, but serving web from all the API instances as well shouldn’t be any additional load over routing all the web traffic to one instance?
Adding routes to an express app doesn’t add any runtime overhead, its the same cpu load for n requests across any amount of servers
Scaling is easier without the arbitrary separation between web and api
@ihatespawn commented on GitHub (May 29, 2024):
not everyone wants to host the web version of cobalt. just look at the instance list, 1/3 of the instances have only the api. maybe some people want to make their own website for cobalt (probably not).
@endigma commented on GitHub (May 30, 2024):
Then you can add a flag for that, its still not a reason you shouldn’t be able to run both halves at once
@wukko commented on GitHub (May 30, 2024):
frontend will soon be completely separated & rewritten. this is why it's the way as it is right now.
@endigma commented on GitHub (May 30, 2024):
rewrite it in rust why don't you, that should fix everything
@wukko commented on GitHub (May 31, 2024):
frontend in rust? nuh uh