Thank you for you for your answer. In this particular case it is an single purpose application stack with 22 containers, so I’m a little cautious about updates. Our main instance of zammad is up to date
I recently ran into this myself. Skip is right about needing to do a custom mount, but to get at those files, you need to get into the right container 1st. This will get you in:
The challenge is then editing the appropriate files in /opt/zammad/app/views/mailer. There doesn’t appear to be a copy of emacs, vi, or pico/nano in the image, so there’s additional hackery needed to manipulate your templates. Hope this is of some help.
That’s a great idea, Skip, kinda where my brain was heading with this. My thought was to grab the source files to make changes and then just add a directory with them as a mount in the docker-compose.overrride that will attach them to the path that’s in the image. My bad not stating that earlier. Since the image is immutable, if I messed something up or needed to revert, I could just comment out the path in the override, bounce the container, and it saves me from having to rebuild a custom image while I fix things.
This is a much more complicated docker stack than I’m used to playing with, so I might be coloring way outside of the lines here. Since none of what I said could be accomplished without knowing where the files live, my intention in my earlier reply was to just give OP an easy way to look at the stuff inside the image to get their bearings (at least that’s how I learn).
If I make headway with this train of thought, I’ll post an update. Thanks.
TBH I have completely different approach. I’m not using default notification. Instead I’ve created few triggers, and as an action I’m sending email with message I want.
Looks like I’ve got success without major hackery, but some experimentation might still be needed. I’m running Ubuntu Server 22.04 LTS for reference so there might be some differences depending on distros.
In the zammad-compose-docker directory, make sure you have a docker-compose.override.yml file. This is not the same as the similarly named docker-compose.override-local.yml file!
Edit the file above to make the mailer templates accessible/editable on your host. Note that my example keeps the local storage driver for simplicity and auto-exposes the files from the image on the host after restarting the container. This keeps the override simple and more inline with the main docker-compose file.
Navigate to /var/lib/docker/volumes/zammad-docker-compose_zammad-mailer-templates/_data/. Note that on my system, the owner of the new directory and everything above it is root:root by docker design and you won’t be able to traverse to it. Everything under that path is owned by the user running the container, though. There’s a few ways around this, some safe, some unsafe, but you really shouldn’t be navigating your directory structure or editing as root.
From here on out, the System Notifications Documentation will work. Just make sure you have the right owner and permissions applied to any modified files. As a proof-of-concept, I did a simple touch ./testfile.txt and then navigated inside the container using my command a few posts earlier to verify it was visible.