File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 4040if $( dpkg --compare-versions " ${PROJECT_VERSION} " " lt" " 2.1" ) ; then
4141 MAGENTO_PHP_VERSION=" 7.0" ;
4242fi
43+
4344# PHP packages
4445apt-get update -y && apt-get install -y \
4546 php${MAGENTO_PHP_VERSION} php${MAGENTO_PHP_VERSION} -common php${MAGENTO_PHP_VERSION} -cli \
@@ -49,18 +50,17 @@ apt-get update -y && apt-get install -y \
4950 php${MAGENTO_PHP_VERSION} -mysql php${MAGENTO_PHP_VERSION} -sqlite3 libapache2-mod-php${MAGENTO_PHP_VERSION} \
5051 php${MAGENTO_PHP_VERSION} -memcache php${MAGENTO_PHP_VERSION} -redis php${MAGENTO_PHP_VERSION} -opcache \
5152 python ruby ruby-dev
52- if [[ " ${MAGENTO_PHP_VERSION} " == " 7.1 " ] ]; then
53+ if [ " ${MAGENTO_PHP_VERSION} " != " 7.2 " ]; then
5354 apt-get install -y php${MAGENTO_PHP_VERSION} -mcrypt
5455fi
5556
56- # Set php version
57- PHP_VERSION=" $( php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,2,3) " ;
57+ # Set php version env
5858if [[ -z $( grep " PHP_VERSION" " /etc/profile.d/env.sh" ) ]]; then
5959cat << EOF >> /etc/profile.d/env.sh
60- export PHP_VERSION="${PHP_VERSION } "
60+ export PHP_VERSION="${MAGENTO_PHP_VERSION } "
6161EOF
6262else
63- sed -i ' /export PHP_VERSION*/c\' " export PHP_VERSION=$PHP_VERSION " /etc/profile.d/env.sh
63+ sed -i ' /export PHP_VERSION*/c\' " export PHP_VERSION=${MAGENTO_PHP_VERSION} " /etc/profile.d/env.sh
6464fi
6565source /etc/profile.d/env.sh
6666
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ mysql -u root -ppassword -e "GRANT ALL PRIVILEGES ON * . * TO 'vagrant'@'localho
2121mysql -u root -ppassword -e " GRANT ALL PRIVILEGES ON * . * TO 'vagrant'@'%';"
2222mysql -u root -ppassword -e " FLUSH PRIVILEGES;"
2323
24+
2425# -----------------------------------------------------------------------------------------------------
2526
2627
123124
124125# -----------------------------------------------------------------------------------------------------
125126
127+
126128# Apache php configuration
127129sed -i ' s/;opcache.enable=.*/opcache.enable=1/' /etc/php/" $PHP_VERSION " /apache2/php.ini
128130sed -i ' s/;opcache.enable_cli=.*/opcache.enable_cli=1/' /etc/php/" $PHP_VERSION " /apache2/php.ini
@@ -163,6 +165,7 @@ systemd-tmpfiles --create /etc/tmpfiles.d/php-cli-opcache.conf
163165
164166# -----------------------------------------------------------------------------------------------------
165167
168+
166169mkdir -p /var/www/html
167170chown -R www-data:www-data /var/www/
168171
@@ -208,6 +211,7 @@ cat <<'EOF' > /etc/apache2/sites-available/001-ssl.conf
208211</IfModule>
209212EOF
210213
214+ # Enable modules
211215a2dismod php7.0 php7.1 php7.2
212216a2ensite 000-default
213217a2ensite 001-ssl
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ if [ "$PROJECT_SOURCE" == "composer" ]; then
3939 magento/module-downloadable-sample-data magento/module-msrp-sample-data \
4040 magento/module-configurable-sample-data magento/module-product-links-sample-data \
4141 magento/module-wishlist-sample-data magento/module-swatches-sample-data \
42- magento/sample-data-media magento/module-offline-shipping-sample-data --no-update
42+ magento/sample-data-media magento/module-offline-shipping-sample-data
4343 fi
4444else
4545 # Install from git
You can’t perform that action at this time.
0 commit comments