feat: custom docker image for suite-crm customizations
Description
Adds a docker image based on the Bitnami image that contains OpenCraft's customizations.
In the repo the custom
directory is mounted in /opt/suitecrm-custom
. This directory is then linked to /bitnami/suitecrm/custom
, so that whenever a new change is deployed it is picked up. A symlinked is used rather than copying the folder because /bitnami/suitecrm
is stored on it's own volume and cannot be changed by the Dockerfile
Almost all of the changes in the custom
directory are auto-generated and copied from production. A .gitignore
is created so that the blowfish
directory isn't copied as it contains sensitive encryption keys (that are regenerated anyway if the folder doesn't exist).
Caveats
Cron is implemented, but not in the most optimal way. It would be better to run a Kubernetes CronJob that invokes whatever command that is needed to run from cron. However this isn't possible (read: quite difficult), because:
- The helm chart doesn't support running cron as any other user than root.
- We'd need to duplicate the environment and configuration for the current SuiteCRM container to the CronJob, which isn't a use-case supported by the helm hart.
Supporting information
Testing instructions
Leads column
Go to the CRM and verify that clicking on the links under the name columns take you to the Lead details page.
Read the updates made to the README and verify that the scripts work as documented (make sure not to run them on Production).
./scripts/fetch-custom-dir.sh
./scripts/push-custom-dir.sh
Cron
Go to the scheduler page and check that any of the jobs have been invoked. Specifically the reminder emails runs frequently