Hi Zammad Community,
I’m currently deploying a custom zpm package using the docker-compose zammad implementation.
My zpm package repo is here. It works fine through rails console when I follow instructions ( Package::Migration.migrate
) located here
Actual behavior:
- During rails container initialization (zammad-init execution), I clearly see my zpm package being installed during bundle exec rake db:seed at the auto_install step
I, [2021-08-17T09:44:40.600853 #22-47388527343980] INFO -- : Migrating to SettingAddInternalArticleCheck (202104070000001)
== 202104070000001 SettingAddInternalArticleCheck: migrating ==================
== 202104070000001 SettingAddInternalArticleCheck: migrated (0.0014s) =========
I, [2021-08-17T09:45:01.730981 #23-46942811666780] INFO -- : Can't fetch image for 'nicole.braun@zammad.org' (maybe no avatar available), http code: 422
W, [2021-08-17T09:45:01.884869 #23-46942811666780] WARN -- : Scoped order is ignored, it's forced to be batch order.
W, [2021-08-17T09:45:02.145175 #23-46942811666780] WARN -- : Scoped order is ignored, it's forced to be batch order.
I, [2021-08-17T09:45:50.851395 #23-46942811666780] INFO -- : NOTICE: install '/opt/zammad/db/addon/opensvc/20210813175700_add_org_support_contract.rb' (664)
I, [2021-08-17T09:45:50.851900 #23-46942811666780] INFO -- : NOTICE: install '/opt/zammad/db/addon/opensvc/20210813180000_add_ticket_customer_priority.rb' (664)
changing settings...
I, [2021-08-17T09:45:54.615967 #32-46963152083300] INFO -- : Setting.set('models_searchable', ["Chat::Session", "KnowledgeBase::Answer::Translation", "Ticket", "Organization", "User"])
I, [2021-08-17T09:45:55.638607 #32-46963152083300] INFO -- : Setting.set('es_url', "http://elastic:9200")
- The problem is that nothing actually run my 2 rb files, so my changes are not sent to the database, and my custom options are not available in zammad
Expected behavior:
- As zpm packages presents in
/opt/zammad/auto_install
are automatically installed by the product, I suppose that docker-entrypoint.sh should deals with installation of any zammad addon present. Actually, I’m not sure because I miss knowledge on rails/zammad, so I’m not confident on how this feature should be properly implemented. I would be happy to submit a PR if it is simple enough for me. - Does adding a call to something like
bundle exec rake db:addons
make sense ? - How to do it properly ?
Workaround:
- I suppose that bind mounting my 2 rb scripts into the
/opt/zammad/db/migrate
folder would do the trick, and rb files would be installed during the bundle exec rake db:migrate but I’m not very sure that it is a clean way to do.
Infos:
- Used Zammad version: 4.1.x
- Used Zammad installation type: docker/ansible playbook inspired from zammad docker-compose
- Operating system: Ubuntu 20.04 LTS
- Browser + version: Firefox 90.0 (64 bit) / Google Chrome 92.0.4515.107
Thanks for your help