tiredofit/docker-freescout

Modules Deleted When Recreating Container

lawfulsoftware opened this issue · 6 comments

Perhaps I am doing something incorrectly. I have a Docker Compose stack that appears to be working correctly. I can install and activate modules however, when I recreate the container, it will often throw an error:

Modules Issue: Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Class "Modules\ApiWebhooks\Providers\ApiWebhooksServiceProvider" not found

I see this appear in while the container is booting up. I don't know if it eventually fixes itself or if, after trying dozens of times to recreate the container, it pushes past the problem and I can actually see the UI instead of an error message. I then have an issue where I cannot click on Mailbox, Manage, or my Profile. This also seems to resolve after a time. Each of the modules then shows as inactive. I have to manually uninstall each module, re-enter its licence key (thankfully it is prefilled), and re-activate it.

This could happen if you are not exporting any volumes, particularly /data .

Thank you for the quick response. I am deploying a stack via Docker Compose in Portainer. I have the following under freescout-app:

volumes:
  - /docker/freescout/data:/data
  - /docker/freescout/modules:/www/html/Modules
  - /docker/freescout/logs:/www/logs

To upgrade, I update the stack which deletes the containers, pulls any updated images, and recreates the containers in the stack. Hopefully this is enough to identify what is wrong.

I would just let .../data:/data do the work and omit your second line regarding modules. I believe this may be breaking the "persistence" that I envisioned and clobbering each other with their own set of symbolic links.

Logs I would also keep, as they are useful long term.

I will give that a try and report back. I was following the note above which says:

### If you want to just keep the original source and add additional modules uncomment this line
  #- /docker/freescout/modules:/www/html/Modules

I can confirm that the error went away after quite a while. When it did come up, I was unable to click on anything in the top blue bar except for the FreeScout logo. I can browse mailboxes and view emails however the following buttons, in addition to the top blue bar, do not work:

  • Reply
  • Note
  • Delete
  • ...
  • Assign
  • Change Status
  • The settings icon on the customer pane to the right of the email

The < > buttons beside the Status dropdown do work. Perhaps it is because they do not use JS.

The following was displayed when the container booted up.

2023-03-23.19:46:23 [WARN] ** [freescout] Potential New Installation / Standalone Installation Detected - Copying Freescout Sourcecode
2023-03-23.19:46:26 [WARN] ** [freescout] Detected /data directory. Persistently saving settings/sessions/cache/uploads/modules
2023-03-23.19:46:31 [INFO] ** [freescout] Auto Configuring based on Environment Variables
In ProviderRepository.php line 279:

Class "Modules\ApiWebhooks\Providers\ApiWebhooksServiceProvider" not found

In ProviderRepository.php line 279:

Class "Modules\ApiWebhooks\Providers\ApiWebhooksServiceProvider" not found

In ProviderRepository.php line 279:

Class "Modules\ApiWebhooks\Providers\ApiWebhooksServiceProvider" not found

2023-03-23.19:46:32 [WARN] ** [freescout] Installing Modules into container
spawn sudo -u nginx php artisan freescout:module-install --no-ansi
In ProviderRepository.php line 279:

Class "Modules\ApiWebhooks\Providers\ApiWebhooksServiceProvider" not found

2023-03-23.19:46:32 [WARN] ** [freescout] Running any Database Migrations
spawn sudo -u nginx php artisan migrate --no-ansi
In ProviderRepository.php line 279:

Class "Modules\ApiWebhooks\Providers\ApiWebhooksServiceProvider" not found

In ProviderRepository.php line 279:

Class "Modules\ApiWebhooks\Providers\ApiWebhooksServiceProvider" not found

Further to this, the Mailbox Settings button for each of the mailboxes on the dashboard do not work however all of the other mailbox buttons and mailbox links on this page work.

Waiting did not seem to fix this lingering issue. I stopped and restarted the stack and everything is now working except, as expected, the modules are Not Installed and the only option is to Deactivate each module.

As a test, I reinstalled and activated only three modules: API and Webhooks, Mailbox Icons, and Sticky Notes. I then redeployed the stack and everything came back up without issue. The three modules are still installed and active.

Thank you, @tiredofit ! I would suggest clarifying the Docker Compose script to avoid confusion; these two lines appear to be unnecessary:

### If you want to just keep the original source and add additional modules uncomment this line
  #- /docker/freescout/modules:/www/html/Modules

Please let me know if you want me to provide my script which contains labels for Traefik.