Allow horizontal scaling config via ENV parameters
Requirements
- [X] Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
- [X] Did you check to see if this issue already exists?
- [X] Is this only a feature request? Do not put multiple feature requests in one issue.
- [X] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
- [X] Do you agree to follow the rules in our Code of Conduct?
Is your proposal related to a problem?
Horizontal scaling as outlined here: https://join-lemmy.org/docs/administration/horizontal_scaling.html currently seems to only work via starting the backend process with cli parameters. This is a bit tricky to do from outside a container and the standard way is to rather do it by passing ENV parameters to the container.
Describe the solution you'd like.
Ideally there should be an equivalent to these config parameters as ENV parameters that can be added to a docker-compose.yml or similar.
Describe alternatives you've considered.
Maybe allow configuring this in the config.hjson file?
Additional context
No response
Anothe alternative is making this configuration automatic using the database
@Nothing4You mentioned in matrix chat that it should work with Exec=lemmy_server --federate-process-index=1 --federate-process-count=3 in [Container]
https://man.archlinux.org/man/quadlet.5.en#EXAMPLES
@dullbananas I dont see any way to do that, as the database doesnt know how many workers you want to start, and which backend should have which index.
@poVoq Would you update the docs to mention these new env vars?