Skip to content

Conversation

@stackdone
Copy link

Proposed change

This pull request introduces initial Docker support for Znuny by adding:
• A production-ready Dockerfile for building Znuny containers with all required dependencies.
• A docker-compose.yml configuration for setting up a full Znuny + MariaDB stack, including persistent volumes, and defaults.
• Support for runtime configuration via environment variables and build arguments.
• Preconfigured tuning parameters for MariaDB (max_allowed_packet, innodb_log_file_size) based on Znuny installation recommendations.
• Auto-configuration of the database host in Kernel/Config.pm.

These additions simplify local testing, development, and containerized deployment of Znuny.

Type of change

  • '1 - 🚀 feature' - New feature (which adds functionality to an existing integration)

Checklist

  • The code change is tested and works locally.(❗)
  • There is no commented out code in this PR.(❕)
  • You improved or added new unit tests.(❕)
  • Local ZnunyCodePolicy passed.(❕)
  • Local UnitTests / Selenium passed.(❕)
  • GitHub workflow CI (UnitTests / Selenium) passed.(❗)

@rkaldung
Copy link
Member

rkaldung commented Jul 5, 2025

@stackdone Thank you for your contribution. I have some questions left and I hope you can answer them for me. I haven't tried the image, maybe it's already there.

  1. How do I execute the console command? Several commands are needed during Znuny's operation.
  2. Is it possible to stop the daemon, and how?
  3. How can I install add-ons?
  4. What about changes of the file Kernel/Config.pm? Do this need always rebuilding the image?

@rkaldung rkaldung added the 2 - clarification The issue or pull requests needs more information. label Jul 5, 2025
@stackdone
Copy link
Author

stackdone commented Jul 6, 2025

@rkaldung

  1. Running console commands
    Directly from the host:
docker exec -u znuny znuny_httpd /opt/znuny/bin/znuny.Console.pl
  • znuny_httpd - container name or id

Or from an interactive shell inside the container:

$ docker exec -ti -u znuny znuny_httpd /bin/bash
$ ./bin/znuny.Console.pl
  1. Starting / stopping the daemon:
docker exec -u znuny znuny_httpd /opt/znuny/bin/otrs.Daemon.pl stop
docker exec -u znuny znuny_httpd /opt/znuny/bin/otrs.Daemon.pl start
  1. Installing add-ons (.opm packages)
    You can use GUI or Console
docker exec -u znuny znuny_httpd /opt/znuny/bin/znuny.Console.pl Admin::Package::Install /your_dir/your_package.opm

You can place the .opm file anywhere on your host system — just make sure to mount the directory containing it into the container using a volume. For example, if your .opm file is in ./packages/MyAddon.opm, add this to your docker-compose.yml (see volume example below)

  1. Editing Kernel/Config.pm
    To make configuration changes at runtime, you can mount a custom Config.pm file in docker-compose.yml:
services:
  znuny:
...
 volumes:
      - znuny_httpd_data:/opt/znuny
      - ./your_config_dir/Kernel/Config.pm:/opt/znuny/Kernel/Config.pm 

This way, changes to the config file can be applied without rebuilding the image.

@rkaldung
Copy link
Member

rkaldung commented Aug 7, 2025

@stackdone, can you please separate the web server and the daemon in their own container? This would make stopping the daemon way easier, because at the moment as far as I see cron would start the daemon again.

@rkaldung rkaldung added the 2 - wait for contributor Contributor, it's your turn. label Aug 23, 2025
@parkingups69-netizen
Copy link

@stackdone, can you please separate the web server and the daemon in their own container? This would make stopping the daemon way easier, because at the moment as far as I see cron would start the daemon again.

Hey there, I'm new to the platform but very interested in have a docker version of znuny.
Ive created 2 images to answer the question you asked to the OP:
parkingups69/znuny-daemon:7.1.7
parkingups69/znuny-httpd:7.1.7

These boot out of the box in the state of having to visit installer.pl

I'm not quite sure how to do a proper pull request for this, or if this particular znuny version is of interest anymore.
What next steps do you recommend?

@parkingups69-netizen
Copy link

parkingups69-netizen commented Dec 26, 2025

Hello,

I've submitted a pull request to follow up on the request of @rkaldung : #755

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 - clarification The issue or pull requests needs more information. 2 - wait for contributor Contributor, it's your turn.

Development

Successfully merging this pull request may close these issues.

5 participants