[PHP-FPM] Include more modules for upcoming features and Nextcloud support, drop ro flag; [Watchdog] Some fixes and changes
parent
7db5877644
commit
72995ff98e
|
@ -1,8 +1,16 @@
|
|||
FROM php:7.1-fpm-alpine
|
||||
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
||||
|
||||
ENV REDIS_PECL 3.1.4
|
||||
ENV MEMCACHED_PECL 3.0.3
|
||||
ENV APCU_PECL 5.1.8
|
||||
|
||||
RUN apk add -U --no-cache libxml2-dev \
|
||||
icu-dev \
|
||||
imap-dev \
|
||||
libmemcached-dev \
|
||||
cyrus-sasl-dev \
|
||||
pcre-dev \
|
||||
icu-libs \
|
||||
redis \
|
||||
mysql-client \
|
||||
|
@ -11,13 +19,33 @@ RUN apk add -U --no-cache libxml2-dev \
|
|||
g++ \
|
||||
make \
|
||||
openssl \
|
||||
&& pecl install redis \
|
||||
openssl-dev \
|
||||
samba-client \
|
||||
libpng \
|
||||
libpng-dev \
|
||||
libjpeg-turbo-dev \
|
||||
libwebp-dev \
|
||||
zlib-dev \
|
||||
libxpm-dev \
|
||||
c-client \
|
||||
&& pecl install redis-${REDIS_PECL} memcached-${MEMCACHED_PECL} APCu-${APCU_PECL} \
|
||||
&& docker-php-ext-enable redis apcu memcached \
|
||||
&& pecl clear-cache \
|
||||
&& docker-php-ext-configure intl \
|
||||
&& docker-php-ext-install intl pdo pdo_mysql xmlrpc \
|
||||
&& docker-php-ext-enable redis \
|
||||
&& pear install channel://pear.php.net/Net_IDNA2-0.1.1 Auth_SASL Net_IMAP NET_SMTP Net_IDNA2 Mail_mime \
|
||||
&& apk del autoconf g++ make libxml2-dev icu-dev
|
||||
&& docker-php-ext-install intl pdo pdo_mysql xmlrpc gd zip pcntl opcache \
|
||||
&& docker-php-ext-configure imap --with-imap --with-imap-ssl \
|
||||
&& docker-php-ext-install imap \
|
||||
&& pear install channel://pear.php.net/Net_IDNA2-0.1.1 Auth_SASL2 Net_IMAP NET_SMTP Net_IDNA2 Mail_mime \
|
||||
&& apk del autoconf g++ make libxml2-dev icu-dev imap-dev openssl-dev cyrus-sasl-dev pcre-dev libpng-dev libpng-dev libjpeg-turbo-dev libwebp-dev zlib-dev \
|
||||
&& { \
|
||||
echo 'opcache.enable=1'; \
|
||||
echo 'opcache.enable_cli=1'; \
|
||||
echo 'opcache.interned_strings_buffer=8'; \
|
||||
echo 'opcache.max_accelerated_files=10000'; \
|
||||
echo 'opcache.memory_consumption=128'; \
|
||||
echo 'opcache.save_comments=1'; \
|
||||
echo 'opcache.revalidate_freq=1'; \
|
||||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
|
||||
|
||||
COPY ./docker-entrypoint.sh /
|
||||
|
||||
|
|
|
@ -82,16 +82,4 @@ if [[ ! -z ${DOMAIN_ARRAY} ]]; then
|
|||
done
|
||||
fi
|
||||
|
||||
# Socket access
|
||||
DOCKER_SOCKET=/var/run/docker.sock
|
||||
DOCKER_GROUP=docker
|
||||
REGULAR_USER=www-data
|
||||
|
||||
if [ -S ${DOCKER_SOCKET} ]; then
|
||||
DOCKER_GID=$(stat -c '%g' ${DOCKER_SOCKET})
|
||||
delgroup $(stat -c '%G' ${DOCKER_SOCKET})
|
||||
addgroup -g ${DOCKER_GID} ${DOCKER_GROUP}
|
||||
adduser ${REGULAR_USER} ${DOCKER_GROUP}
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
|
|
@ -66,7 +66,9 @@ get_container_ip() {
|
|||
until [[ ${CONTAINER_IP} =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]] || [[ ${LOOP_C} -gt 5 ]]; do
|
||||
sleep 1
|
||||
CONTAINER_ID=$(curl --silent http://dockerapi:8080/containers/json | jq -r ".[] | {name: .Config.Labels[\"com.docker.compose.service\"], id: .Id}" | jq -rc "select( .name | contains(\"${1}\")) | .id")
|
||||
if [[ ! -z ${CONTAINER_ID} ]]; then
|
||||
CONTAINER_IP=$(curl --silent http://dockerapi:8080/containers/${CONTAINER_ID}/json | jq -r '.NetworkSettings.Networks[].IPAddress')
|
||||
fi
|
||||
LOOP_C=$((LOOP_C + 1))
|
||||
done
|
||||
[[ ${LOOP_C} -gt 5 ]] && echo 240.0.0.0 || echo ${CONTAINER_IP}
|
||||
|
|
|
@ -96,13 +96,13 @@ services:
|
|||
- rspamd
|
||||
|
||||
php-fpm-mailcow:
|
||||
image: mailcow/phpfpm:1.2
|
||||
image: mailcow/phpfpm:1.3
|
||||
build: ./data/Dockerfiles/phpfpm
|
||||
command: "php-fpm -d date.timezone=${TZ}"
|
||||
depends_on:
|
||||
- redis-mailcow
|
||||
volumes:
|
||||
- ./data/web:/web:ro
|
||||
- ./data/web:/web:rw
|
||||
- ./data/conf/rspamd/dynmaps:/dynmaps:ro
|
||||
- dkim-vol-1:/data/dkim
|
||||
environment:
|
||||
|
@ -295,8 +295,9 @@ services:
|
|||
- /lib/modules:/lib/modules:ro
|
||||
|
||||
watchdog-mailcow:
|
||||
image: mailcow/watchdog:1.5
|
||||
image: mailcow/watchdog:1.6
|
||||
build: ./data/Dockerfiles/watchdog
|
||||
command: /watchdog.sh
|
||||
init: false
|
||||
volumes:
|
||||
- vmail-vol-1:/vmail:ro
|
||||
|
|
Loading…
Reference in New Issue