The goal here is to make it simple and safe to scale Mautic up to millions of leads per week, while maintaining HIPAA & PCI compliance. Other helpful services such as CloudFlare and Newrelic are supported, but optional.
- AWS EB environment running PHP 7.1 with environment variables described below
- AWS RDS MySQL instance (Aurora recommended, preferably encrypted)
- AWS EFS Volume (used for shared media/spool/etc)
- Add the AmazonEC2ReadOnlyAccess policy to the aws-elasticbeanstalk-ec2-role (for the cron script to run on leading instance only)
- We recommend having the Elastic Beanstalk CLI installed locally.
APP_URL - The default full URL for your site.
DB_HOST - RDS Host.
DB_HOST_RO - Optional: RDS Host for read-only slave cluster.
DB_USER - RDS User.
DB_PASSWD - RDS Password.
DB_NAME - RDS Database name.
DB_PORT - RDS port.
SECRET_KEY - Hash key for encryption.
MAILER_FROM_NAME - Default "from" email name.
MAILER_FROM_EMAIL - Default "from" email address.
EFS_DNS_NAME - The full DNS of the EFS mount.
MAUTIC_INSTALL - Set to "1" to initialize mautic for the first/cold deployment only!
MAUTIC_WORKERS - Number of concurrent campaign trigger workers to run on the leading instance.
NR_APPNAME - Newrelic application name.
NR_APM_INSTALL_KEY - NewRelic install key for Application Monitoring.
NR_INF_INSTALL_KEY - NewRelic install key for Infrastructure.
You will need to set these up if you wish to deploy your fork to an Elastic Beanstalk environment automatically from Travis.
AWS_ACCESS_KEY_ID - From your IAM console (keep hidden).
AWS_SECRET_ACCESS_KEY - From your IAM console (keep hidden).
AWS_REGION - The region to deploy to (us-east-1).
AWS_EB_APP - App name to deploy (mautic-eb).
AWS_EB_ENV - Elastic beanstalk environment name (mautic-eb-dev).
ELASTIC_BEANSTALK_LABEL - Label name of the new version (optional).
ELASTIC_BEANSTALK_DESCRIPTION - Description of the new version (optional). Defaults to the last commit message.
File structure in /mautic_eb will be copied (destructively) into the /mautic folder on composer install or update. For configuration files and other changes that cannot be plugin-based. Similarly you can use /mautic_custom for customizations that are brand-specific. Third party plugins that use the "mautic-plugin" installer will have their folders symlinked into the correct location.
- mautic_eb/* --> mautic/*
- mautic_custom/* --> mautic/*
- plugins/* --> mautic/plugins/*
Custom dependencies can be included in a root composer.custom
Pretty much the same as working with Mautic core:
- Clone & composer:
git clone https://github.com/TheDMSGroup/mautic-eb.git
cd mautic-eb
composer install
- Set up local host at http://mautic.loc that points to the
.../mautic-eb/mautic
sub-folder. - Browse to http://mautic.loc and go through the standard setup.
Should you not wish to use Travis to deploy for you, you can do it manually from your local machine:
- Make sure you've set up the Requirements above.
- run
bash ./scripts/build.sh
- run
eb init
if you haven't already. - run
eb deploy
- Important: Do not run
composer install
from within the./mautic
folder, only in the root project folder. composer cc
to clear all Mautic/Symfony caches.composer custom
to update symlinks for all customizations to mautic core (from mautic_eb and mautic_custom).composer less
to compile LESS styles (should you need to extend or modify the core styles using SCSS).composer assets
to regenerate core CSS and JS files for deployment (should you need to modify core JS or SCSS).composer test
to run the full codeception suite.- The file
composer.custom
can be created for third-party dependencies/plugins/customizations
Need to process a million new contacts every day? Need to add a custom integration every day, without writing code?
These are the kinds of requirements we have in Performance Marketing.
With that in mind, we include optional plugins
to augment this build. You can access them all at once by renaming composer.custom.dev
to composer.custom
and running composer install
.