Git Product home page Git Product logo

azure-app-service-drupal7's People

Contributors

snpdev avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

azure-app-service-drupal7's Issues

PHP 7.1 support

Upgrade the container’s base image from php:5.6.21-apache to php:7.1-apache.

Adapt from

  1. Official Docker container solution for Drupal
    and
  2. App Service Builtin Image for PHP

From the Drupal solution, use the following PHP recommendations

# install the PHP extensions we need
RUN set -ex; \
	\
	if command -v a2enmod; then \
		a2enmod rewrite; \
	fi; \
	\
	savedAptMark="$(apt-mark showmanual)"; \
	\
	apt-get update; \
	apt-get install -y --no-install-recommends \
		libjpeg-dev \
		libpng-dev \
		libpq-dev \
	; \
	\
	docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
	docker-php-ext-install -j "$(nproc)" \
		gd \
		opcache \
		pdo_mysql \
		pdo_pgsql \
		zip \
	; \
	\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
	apt-mark auto '.*' > /dev/null; \
	apt-mark manual $savedAptMark; \
	ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
		| awk '/=>/ { print $3 }' \
		| sort -u \
		| xargs -r dpkg-query -S \
		| cut -d: -f1 \
		| sort -u \
		| xargs -rt apt-mark manual; \
	\
	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
	rm -rf /var/lib/apt/lists/*

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN { \
		echo 'opcache.memory_consumption=128'; \
		echo 'opcache.interned_strings_buffer=8'; \
		echo 'opcache.max_accelerated_files=4000'; \
		echo 'opcache.revalidate_freq=60'; \
		echo 'opcache.fast_shutdown=1'; \
		echo 'opcache.enable_cli=1'; \
	} > /usr/local/etc/php/conf.d/opcache-recommended.ini

Relative to the App Service Builtin Image for PHP

Clone the repo https://github.com/Azure/app-service-builtin-images.git. Then, compare the directory php\7.2.1-apache\ to php\5.6.21-apache. The differences are as follows:

  1. In apache2.conf the placement of:
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
  1. In Dockerfile, the differences are related to the change in the PHP version number, and some changes to the install the PHP extensions we need. Since we will use the PHP recommendations from the official Drupal image, we do not need to be concerned with the recommendations of the App Service Builtin Image for PHP.

Memcached

For Memcached, the installation method for PHP 7.1 is different from that of PHP 5.6. Remove the following lines:

# PHP extension
RUN \
cd /usr/src/php/ext \
&& pecl download memcache-3.0.8 \
&& gzip -d < memcache-3.0.8.tgz | tar -xvf - \
&& rm memcache-3.0.8.tgz \
&& mv memcache-3.0.8 memcache \
&& docker-php-ext-install memcache

Please find a suitable a replacement to enable memcache support in PHP 7.1. References I have come across include:

Persist syslog

A recommended practice for a Drupal 7 site in production is to disable the Database logging (dblog) module and enable the Syslog (syslog) module to log and record system events.

For this reason, the syslog should be persisted.

Update the dockerfile to ensure that the active and archived syslog file are persisted to home/LogFiles.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.