How to build custom packages

Hello,

I’m trying to wrap my head around creating custom packages for Zammad, but so far I did not succeed :face_with_diagonal_mouth:

I’ve read the pinned post on Package Tutorial and I’m trying to follow that. But even the simplest Hello World example does not work. If I build that and install the package, I see the file in /public/assets/hello.txt. But when I try to go to that file I get a nginx 404 error. So, my thought was, maybe I need to precompile for the file to be available to nginx. But when I run
docker compose run --rm zammad-railsserver rake zammad:package:post_install I get an error:

rake aborted!
ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

So what am I doing wrong here… I’m not a rails dev (enough experience in PHP, Python, JS, HTML etc..) so maybe I’m missing something.

My final goal is to create an extra tab in de sidebar (like the Git integration) to allow for linking/creating tickets in Linear issue tracking system.

Any help is greatly appreciated :folded_hands:

And a tangent question: how much of the development of the package should be done again when the new 7 version with the vue frontend is released?

Ok, found out that nodejs is not installed in the docker image.. So rebuilding the docker image is the only solution for that?

Anyways, trying to get it to work on Ubuntu VPS without docker. Installed the Hello World package and that worked. So I think I will stick to the package installation. Seems better for using custom packages.

Hi,

this is how I built custom packages:

I hope it helps

Currently, we don’t support packages on docker environments. If really want to go into package development, you should switch to a classic debian/ubuntu installation. There are some tutorials:

1 Like

Like 90%. Maybe you can keep some ruby libary code, but controller-wise it will switch to graphql and frontend-wise it’s 100% rewrite.

OK, thanks. Good to know!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.