snp-technologies / azure-app-service-drupal7 Goto Github PK
View Code? Open in Web Editor NEWA Docker solution for Drupal 7 on Azure App Service for Containers
License: MIT License
A Docker solution for Drupal 7 on Azure App Service for Containers
License: MIT License
Upgrade the container’s base image from php:5.6.21-apache
to php:7.1-apache
.
# 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
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:
apache2.conf
the placement of:IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
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.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:
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.
I run into this issue when the Dockerfile tries to create the symbolic link. Any idea how to fix this issue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.