Skip to content

Commit

Permalink
Merge pull request #63 from TheDMSGroup/dev
Browse files Browse the repository at this point in the history
Update 2.15.0-beta to latest sha
  • Loading branch information
heathdutton authored Dec 18, 2018
2 parents d55ef70 + 7947b81 commit 1890e8f
Show file tree
Hide file tree
Showing 9 changed files with 147 additions and 158 deletions.
52 changes: 36 additions & 16 deletions .ebextensions/50_php.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ option_settings:
display_errors: "Off"
max_execution_time: 60

packages:
yum:
php71-imap: []
php71-pecl-redis: []

files:
"/etc/php.d/z_project.ini":
mode: "000644"
Expand All @@ -30,6 +25,7 @@ files:
[opcache]
opcache.enable = On
opcache.enable_cli = On
opcache.file_cache = "/tmp/opcache"
opcache.validate_timestamps = On
opcache.revalidate_freq = 300
opcache.memory_consumption = 256
Expand All @@ -55,26 +51,50 @@ files:
extension=mailparse.so

container_commands:
50_install_imap:
test: '[ ! -f /usr/lib64/php/7.1/modules/imap.so ] && echo "imap is not installed"'
command: sudo yum install php71-imap -y
51_install_mailparse:
test: '[ ! -f /usr/lib64/php/7.1/modules/mailparse.so ] && echo "mailparse is not installed"'

# PHP 7.1 Requirements...
50_php71_install_yum_packages:
test: '[ $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) -eq "71" ]'
command: |
sudo yum install php71-imap -y
sudo yum install php71-pecl-redis -y
51_php71_install_mailparse:
test: '[ $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) -eq "71" && ! -f /usr/lib64/php/7.1/modules/mailparse.so ]'
command: |
sudo pecl7 install --force mailparse
sudo -u root bash -c "sed '/extension=\"mailparse.so\"/d' /etc/php.ini > /etc/php.ini"
# Mautic currently uses an older version of Doctrine which lacks APCu compatibility.
# Installing APC Backward Compatibility allows the old APC functions to use APCu instead without modifying Mautic.
52_install_apcu_bc:
test: '[ ! -f /usr/lib64/php/7.1/modules/apc.so ] && echo "APC backward compatibility is not installed"'
52_php71_install_apcu_bc:
test: '[ $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) -eq "71" && ! -f /usr/lib64/php/7.1/modules/apc.so ]'
command: |
no | sudo pecl7 install --force apcu_bc-beta
sudo rm -rf /etc/php-7.1.d/40-apcu.ini
sudo -u root bash -c "sed '/extension=\"apc.so\"/d' /etc/php.ini > /etc/php.ini"
sudo -u root bash -c "sed '/extension=\"apcu.so\"/d' /etc/php.ini > /etc/php.ini"
# A restart of apache is not typically necessary.
# 52_restart_httpd:
# command: sudo service httpd restart
53_redis_configure:

# PHP 7.2 Requirements...
52_php72_install_yum_packages:
test: '[ $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) -eq "72" ]'
command: |
sudo yum install php72-imap -y
sudo yum install php72-pecl-redis -y
53_php72_install_mailparse:
test: '[ $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) -eq "72" && ! -f /usr/lib64/php/7.2/modules/mailparse.so ]'
command: |
sudo pecl7 install --force mailparse
sudo -u root bash -c "sed '/extension=\"mailparse.so\"/d' /etc/php.ini > /etc/php.ini"
# Mautic currently uses an older version of Doctrine which lacks APCu compatibility.
# Installing APC Backward Compatibility allows the old APC functions to use APCu instead without modifying Mautic.
54_php72_install_apcu_bc:
test: '[ $(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) -eq "72" && ! -f /usr/lib64/php/7.2/modules/apc.so ]'
command: |
no | sudo pecl7 install --force apcu_bc-beta
sudo rm -rf /etc/php-7.2.d/40-apcu.ini
sudo -u root bash -c "sed '/extension=\"apc.so\"/d' /etc/php.ini > /etc/php.ini"
sudo -u root bash -c "sed '/extension=\"apcu.so\"/d' /etc/php.ini > /etc/php.ini"

# Redis for all versions of PHP.
55_redis_configure:
command: bash scripts/redis-start.sh
ignoreErrors: true
22 changes: 16 additions & 6 deletions .ebextensions/70_mautic.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,31 @@ container_commands:
71_mautic_efs_shared_dashboard:
command: ln -sf /efs/mautic/app/cache/data/shared_dashboard mautic/app/cache/prod/data
# Installation will only take place if the environment variable MAUTIC_INSTALL is 1.
71_mautic_install:
72_mautic_install:
command: bash scripts/mautic-install.sh
leader_only: true
# Run database migrations to ensure schema is up to date with the current major version.
72_mautic_migrations:
73_mautic_migrations:
command: console doctrine:migrations:migrate --no-interaction --allow-no-migration -vvv
ignoreErrors: true
leader_only: true
# Force schema updates for custom plugins that have no migrations.
# 73_mautic_schema:
# 74_mautic_schema:
# command: console doctrine:schema:update --force -vvv
# leader_only: true
# Download IP Lookup databases, which are stored in each instance and not on the EFS mount.
74_mautic_iplookup:
75_mautic_iplookup:
command: console mautic:iplookup:download -vvv
# Promote new changes to core CSS and JS. This assumes LESS compilation has taken place at build-time.
75_generate_assets:
command: console mautic:assets:generate -vvv
76_generate_assets:
command: console mautic:assets:generate -vvv

files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/77_mautic_cache_warm.sh":
mode: "000755"
owner: root
group: root
encoding: plain
content: |
#!/usr/bin/env bash
console cache:warm --no-interaction -vvv
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
- mysql

php:
- 7.1
- 7.2

git:
depth: 200
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"description": "Mautic Open Source Distribution - Modified for scalability",
"license": "GPL-3.0-only",
"require": {
"mautic/core": "dev-master#f6aa213482047108968ed9766a2eda7c8e94d615",
"aws/aws-sdk-php": "3.36"
"mautic/core": "dev-master#23a0b3acb779b3e33b2e6ac65c629fd5c36caa0c",
"aws/aws-sdk-php": "3.36",
"twig/twig": "v1.35.0"
},
"repositories": [
{
Expand Down
Loading

0 comments on commit 1890e8f

Please sign in to comment.