Skip to content

Fixes #661 - Added resource limit scenario #662

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

Merged
merged 6 commits into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions install/docker-compose/docker-compose-scenarios.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ The following scenarios are supported and explained further below:

- Disable the backup service
- Add an Ollama instance to the stack
- Limit hardware resources of the stack

You can find the files in the
`Zammad-Docker-Compose repository <https://github.com/zammad/zammad-docker-compose>`_.
Expand Down Expand Up @@ -220,6 +221,15 @@ out of the box.
To use it in Zammad, add the service name and port (``http://ollama:11434``) to
the :admin-docs:`provider configuration </ai/provider.html>`.

Limit Resources
^^^^^^^^^^^^^^^

If you want to limit the hardware resources the Zammad stack is allowed to use,
use the ``scenarios/apply-resource-limits.yml`` scenario. Default values for CPU
and memory usage for each container in the stack are applied then. You can find
these default values in the ``.env.dist`` file. Provide the changed variables
you want to use as environment variables and deploy the stack.

Other Use Cases
^^^^^^^^^^^^^^^

Expand Down
31 changes: 23 additions & 8 deletions install/docker-compose/environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,36 @@ Zammad
- ``(unset)``
- Allows spawning ``n`` workers to allow more simultaneous connections for
Zammads web UI. See also: :doc:`/appendix/configure-env-vars`
* - | ZAMMAD_SESSION_JOBS
| _CONCURRENT

In case you applied :doc:`docker hardware resource limits </install/docker-compose/docker-compose-scenarios>`,
the zammad-railsserver's CPU setting should match the value from this variable.
* - | ZAMMAD_PROCESS_SESSION
| _JOBS_WORKERS
- ``(unset)``
- Allows spawning ``n`` session job workers to release pressure from
Zammads background worker. See also: :doc:`/appendix/configure-env-vars`
- Allows spawning ``n`` independent session jobs workers to release
pressure from Zammad's background worker. See also:
:doc:`/appendix/configure-env-vars`.

In case you applied :doc:`docker hardware resource limits </install/docker-compose/docker-compose-scenarios>`,
the zammad-scheduler CPU setting should match the sum of all worker settings variables.
* - | ZAMMAD_PROCESS_SCHEDULED
| _JOBS_WORKERS
- ``(unset)``
- Allows spawning ``1`` independent scheduled job worker to release
pressure from Zammads background worker. See also: :doc:`/appendix/configure-env-vars`
- Allows spawning ``1`` independent scheduled jobs worker to release
pressure from Zammad's background worker. See also:
:doc:`/appendix/configure-env-vars`.

In case you applied :doc:`docker hardware resource limits </install/docker-compose/docker-compose-scenarios>`,
the zammad-scheduler CPU setting should match the sum of all worker settings variables.
* - | ZAMMAD_PROCESS_DELAYED
| _JOBS_WORKERS
- ``(unset)``
- Allows spawning ``n`` delayed job workers to release pressure from
Zammads background worker. See also: :doc:`/appendix/configure-env-vars`
- Allows spawning ``n`` delayed jobs workers to release pressure from
Zammad's background worker. See also: :doc:`/appendix/configure-env-vars`.


In case you applied :doc:`docker hardware resource limits </install/docker-compose/docker-compose-scenarios>`,
the zammad-scheduler CPU setting should match the sum of all worker settings variables.
* - RAILS_TRUSTED_PROXIES
- ``['127.0.0.1', '::1']``
- By default Zammad trusts localhost proxies only.
Expand Down