Updated Ubuntu images

This commit is contained in:
Alexey Pustovalov 2020-04-28 22:16:47 +03:00
parent 81be9d6ae5
commit 8f2cbd3948
18 changed files with 126 additions and 105 deletions

View File

@ -36,7 +36,6 @@ services:
- MYSQL_USER - MYSQL_USER
- MYSQL_PASSWORD - MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD - MYSQL_ROOT_PASSWORD
user: root
depends_on: depends_on:
- mysql-server - mysql-server
- zabbix-java-gateway - zabbix-java-gateway
@ -95,7 +94,6 @@ services:
env_file: env_file:
- .env_prx - .env_prx
- .env_prx_sqlite3 - .env_prx_sqlite3
user: root
depends_on: depends_on:
- zabbix-java-gateway - zabbix-java-gateway
- zabbix-snmptraps - zabbix-snmptraps
@ -146,7 +144,6 @@ services:
- .env_db_mysql_proxy - .env_db_mysql_proxy
- .env_prx - .env_prx
- .env_prx_mysql - .env_prx_mysql
user: root
depends_on: depends_on:
- mysql-server - mysql-server
- zabbix-java-gateway - zabbix-java-gateway
@ -191,7 +188,6 @@ services:
secrets: secrets:
- MYSQL_USER - MYSQL_USER
- MYSQL_PASSWORD - MYSQL_PASSWORD
user: root
depends_on: depends_on:
- mysql-server - mysql-server
- zabbix-server - zabbix-server
@ -244,7 +240,6 @@ services:
secrets: secrets:
- MYSQL_USER - MYSQL_USER
- MYSQL_PASSWORD - MYSQL_PASSWORD
user: root
depends_on: depends_on:
- mysql-server - mysql-server
- zabbix-server - zabbix-server
@ -295,7 +290,6 @@ services:
mode: global mode: global
env_file: env_file:
- .env_agent - .env_agent
user: root
privileged: true privileged: true
pid: "host" pid: "host"
networks: networks:
@ -325,7 +319,6 @@ services:
memory: 256M memory: 256M
env_file: env_file:
- .env_java - .env_java
user: root
networks: networks:
zbx_net_backend: zbx_net_backend:
aliases: aliases:
@ -352,7 +345,6 @@ services:
reservations: reservations:
cpus: '0.25' cpus: '0.25'
memory: 128M memory: 128M
user: root
networks: networks:
zbx_net_frontend: zbx_net_frontend:
aliases: aliases:
@ -376,7 +368,6 @@ services:
- MYSQL_USER - MYSQL_USER
- MYSQL_PASSWORD - MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD - MYSQL_ROOT_PASSWORD
user: root
stop_grace_period: 1m stop_grace_period: 1m
networks: networks:
zbx_net_backend: zbx_net_backend:

View File

@ -40,7 +40,6 @@ services:
- MYSQL_USER - MYSQL_USER
- MYSQL_PASSWORD - MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD - MYSQL_ROOT_PASSWORD
user: root
depends_on: depends_on:
- mysql-server - mysql-server
- zabbix-java-gateway - zabbix-java-gateway
@ -103,7 +102,6 @@ services:
env_file: env_file:
- .env_prx - .env_prx
- .env_prx_sqlite3 - .env_prx_sqlite3
user: root
depends_on: depends_on:
- zabbix-java-gateway - zabbix-java-gateway
- zabbix-snmptraps - zabbix-snmptraps
@ -158,7 +156,6 @@ services:
- .env_db_mysql_proxy - .env_db_mysql_proxy
- .env_prx - .env_prx
- .env_prx_mysql - .env_prx_mysql
user: root
depends_on: depends_on:
- mysql-server - mysql-server
- zabbix-java-gateway - zabbix-java-gateway
@ -207,7 +204,6 @@ services:
secrets: secrets:
- MYSQL_USER - MYSQL_USER
- MYSQL_PASSWORD - MYSQL_PASSWORD
user: root
depends_on: depends_on:
- mysql-server - mysql-server
- zabbix-server - zabbix-server
@ -264,7 +260,6 @@ services:
secrets: secrets:
- MYSQL_USER - MYSQL_USER
- MYSQL_PASSWORD - MYSQL_PASSWORD
user: root
depends_on: depends_on:
- mysql-server - mysql-server
- zabbix-server - zabbix-server
@ -319,7 +314,6 @@ services:
mode: global mode: global
env_file: env_file:
- .env_agent - .env_agent
user: root
privileged: true privileged: true
pid: "host" pid: "host"
networks: networks:
@ -353,7 +347,6 @@ services:
memory: 256M memory: 256M
env_file: env_file:
- .env_java - .env_java
user: root
networks: networks:
zbx_net_backend: zbx_net_backend:
aliases: aliases:
@ -384,7 +377,6 @@ services:
reservations: reservations:
cpus: '0.25' cpus: '0.25'
memory: 128M memory: 128M
user: root
networks: networks:
zbx_net_frontend: zbx_net_frontend:
aliases: aliases:
@ -408,7 +400,6 @@ services:
- MYSQL_USER - MYSQL_USER
- MYSQL_PASSWORD - MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD - MYSQL_ROOT_PASSWORD
user: root
stop_grace_period: 1m stop_grace_period: 1m
networks: networks:
zbx_net_backend: zbx_net_backend:

View File

@ -35,7 +35,6 @@ services:
secrets: secrets:
- POSTGRES_USER - POSTGRES_USER
- POSTGRES_PASSWORD - POSTGRES_PASSWORD
user: root
depends_on: depends_on:
- postgres-server - postgres-server
- zabbix-java-gateway - zabbix-java-gateway
@ -94,7 +93,6 @@ services:
env_file: env_file:
- .env_prx - .env_prx
- .env_prx_sqlite3 - .env_prx_sqlite3
user: root
depends_on: depends_on:
- zabbix-java-gateway - zabbix-java-gateway
- zabbix-snmptraps - zabbix-snmptraps
@ -149,7 +147,6 @@ services:
- MYSQL_USER - MYSQL_USER
- MYSQL_PASSWORD - MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD - MYSQL_ROOT_PASSWORD
user: root
depends_on: depends_on:
- mysql-server - mysql-server
- zabbix-java-gateway - zabbix-java-gateway
@ -194,7 +191,6 @@ services:
secrets: secrets:
- POSTGRES_USER - POSTGRES_USER
- POSTGRES_PASSWORD - POSTGRES_PASSWORD
user: root
depends_on: depends_on:
- postgres-server - postgres-server
- zabbix-server - zabbix-server
@ -247,7 +243,6 @@ services:
secrets: secrets:
- POSTGRES_USER - POSTGRES_USER
- POSTGRES_PASSWORD - POSTGRES_PASSWORD
user: root
depends_on: depends_on:
- postgres-server - postgres-server
- zabbix-server - zabbix-server
@ -298,7 +293,6 @@ services:
mode: global mode: global
env_file: env_file:
- .env_agent - .env_agent
user: root
privileged: true privileged: true
pid: "host" pid: "host"
networks: networks:
@ -328,7 +322,6 @@ services:
memory: 256M memory: 256M
env_file: env_file:
- .env_java - .env_java
user: root
networks: networks:
zbx_net_backend: zbx_net_backend:
aliases: aliases:
@ -355,7 +348,6 @@ services:
reservations: reservations:
cpus: '0.25' cpus: '0.25'
memory: 128M memory: 128M
user: root
networks: networks:
zbx_net_frontend: zbx_net_frontend:
aliases: aliases:
@ -379,7 +371,6 @@ services:
- MYSQL_USER - MYSQL_USER
- MYSQL_PASSWORD - MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD - MYSQL_ROOT_PASSWORD
user: root
stop_grace_period: 1m stop_grace_period: 1m
networks: networks:
zbx_net_backend: zbx_net_backend:
@ -397,7 +388,6 @@ services:
secrets: secrets:
- POSTGRES_USER - POSTGRES_USER
- POSTGRES_PASSWORD - POSTGRES_PASSWORD
user: root
stop_grace_period: 1m stop_grace_period: 1m
networks: networks:
zbx_net_backend: zbx_net_backend:

View File

@ -36,7 +36,6 @@ services:
secrets: secrets:
- POSTGRES_USER - POSTGRES_USER
- POSTGRES_PASSWORD - POSTGRES_PASSWORD
user: root
depends_on: depends_on:
- postgres-server - postgres-server
- zabbix-java-gateway - zabbix-java-gateway
@ -96,7 +95,6 @@ services:
env_file: env_file:
- .env_prx - .env_prx
- .env_prx_sqlite3 - .env_prx_sqlite3
user: root
depends_on: depends_on:
- zabbix-java-gateway - zabbix-java-gateway
- zabbix-snmptraps - zabbix-snmptraps
@ -152,7 +150,6 @@ services:
- MYSQL_USER - MYSQL_USER
- MYSQL_PASSWORD - MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD - MYSQL_ROOT_PASSWORD
user: root
depends_on: depends_on:
- mysql-server - mysql-server
- zabbix-java-gateway - zabbix-java-gateway
@ -199,7 +196,6 @@ services:
secrets: secrets:
- POSTGRES_USER - POSTGRES_USER
- POSTGRES_PASSWORD - POSTGRES_PASSWORD
user: root
depends_on: depends_on:
- postgres-server - postgres-server
- zabbix-server - zabbix-server
@ -253,7 +249,6 @@ services:
secrets: secrets:
- POSTGRES_USER - POSTGRES_USER
- POSTGRES_PASSWORD - POSTGRES_PASSWORD
user: root
depends_on: depends_on:
- postgres-server - postgres-server
- zabbix-server - zabbix-server
@ -305,7 +300,6 @@ services:
mode: global mode: global
env_file: env_file:
- .env_agent - .env_agent
user: root
privileged: true privileged: true
pid: "host" pid: "host"
networks: networks:
@ -336,7 +330,6 @@ services:
memory: 256M memory: 256M
env_file: env_file:
- .env_java - .env_java
user: root
networks: networks:
zbx_net_backend: zbx_net_backend:
aliases: aliases:
@ -364,7 +357,6 @@ services:
reservations: reservations:
cpus: '0.25' cpus: '0.25'
memory: 128M memory: 128M
user: root
networks: networks:
zbx_net_frontend: zbx_net_frontend:
aliases: aliases:
@ -388,7 +380,6 @@ services:
- MYSQL_USER - MYSQL_USER
- MYSQL_PASSWORD - MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD - MYSQL_ROOT_PASSWORD
user: root
stop_grace_period: 1m stop_grace_period: 1m
networks: networks:
zbx_net_backend: zbx_net_backend:
@ -406,7 +397,6 @@ services:
secrets: secrets:
- POSTGRES_USER - POSTGRES_USER
- POSTGRES_PASSWORD - POSTGRES_PASSWORD
user: root
stop_grace_period: 1m stop_grace_period: 1m
networks: networks:
zbx_net_backend: zbx_net_backend:

View File

@ -222,8 +222,6 @@ prepare_web_server() {
else else
echo "**** Impossible to enable SSL support for Nginx. Certificates are missed." echo "**** Impossible to enable SSL support for Nginx. Certificates are missed."
fi fi
ln -sf /dev/fd/2 /var/log/nginx/error.log
} }
clear_deploy() { clear_deploy() {

View File

@ -19,7 +19,13 @@ RUN set -eux && \
zabbix && \ zabbix && \
mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \ mkdir -p /etc/zabbix/web && \
mkdir -p /var/lib/php/session && \
apt-get -y update && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
gpg \
dirmngr \
gpg-agent \
ca-certificates && \
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \ NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
found=''; \ found=''; \
for server in \ for server in \
@ -50,8 +56,8 @@ RUN set -eux && \
supervisor && \ supervisor && \
rm -f /etc/nginx/conf.d/*.conf && \ rm -f /etc/nginx/conf.d/*.conf && \
rm -rf /var/cache/nginx/ && \ rm -rf /var/cache/nginx/ && \
DEBIAN_FRONTEND=noninteractive apt-get -y purge \ rm -f /etc/php/7.2/fpm/pool.d/www.conf && \
wget && \ DEBIAN_FRONTEND=noninteractive apt-get -y purge curl gpg dirmngr gpg-agent && \
apt-get -y autoremove && \ apt-get -y autoremove && \
apt-get -y clean && \ apt-get -y clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
@ -96,6 +102,12 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ && \
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ && \ chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ && \
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ && \ chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ && \
chown --quiet -R zabbix:root /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
chgrp -R 0 /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
chmod -R g=u /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \
DEBIAN_FRONTEND=noninteractive apt-get -y purge \ DEBIAN_FRONTEND=noninteractive apt-get -y purge \
gettext \ gettext \
git \ git \
@ -112,4 +124,6 @@ VOLUME ["/etc/ssl/nginx"]
COPY ["docker-entrypoint.sh", "/usr/bin/"] COPY ["docker-entrypoint.sh", "/usr/bin/"]
USER 1997
ENTRYPOINT ["docker-entrypoint.sh"] ENTRYPOINT ["docker-entrypoint.sh"]

View File

@ -1,9 +0,0 @@
max_execution_time=300
memory_limit=128M
post_max_size=16M
upload_max_filesize=2M
max_input_time=300
always_populate_raw_post_date=-1
max_input_vars=10000
; date.timezone=Europe/Riga
session.save_path=/var/lib/php7

View File

@ -0,0 +1,9 @@
include=/etc/php/7.2/fpm/pool.d/*.conf
[global]
pid = /tmp/php-fpm.pid
error_log = /dev/fd/2
daemonize = no

View File

@ -0,0 +1,25 @@
[zabbix]
listen = /tmp/php-fpm.sock
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
slowlog = /dev/fd/1
php_admin_value[error_log] = /dev/fd/2
php_admin_flag[log_errors] = on
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/session
php_value[max_execution_time]= 300
php_value[memory_limit]= 128M
php_value[post_max_size]= 16M
php_value[upload_max_filesize]= 2M
php_value[max_input_time]= 300
php_value[max_input_vars]= 10000
; php_value[date.timezone]= Europe/Riga

View File

@ -51,7 +51,7 @@ server {
} }
location ~ .php$ { location ~ .php$ {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;

View File

@ -75,7 +75,7 @@ server {
} }
location ~ .php$ { location ~ .php$ {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;

View File

@ -237,7 +237,7 @@ prepare_zbx_web_config() {
ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php"
PHP_CONFIG_FILE="/etc/php/7.2/apache2/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php/7.2/fpm/pool.d/zabbix.conf"
update_config_var "$PHP_CONFIG_FILE" "php_value[max_execution_time]" "${ZBX_MAXEXECUTIONTIME:-"600"}" update_config_var "$PHP_CONFIG_FILE" "php_value[max_execution_time]" "${ZBX_MAXEXECUTIONTIME:-"600"}"
update_config_var "$PHP_CONFIG_FILE" "php_value[memory_limit]" "${ZBX_MEMORYLIMIT:-"128M"}" update_config_var "$PHP_CONFIG_FILE" "php_value[memory_limit]" "${ZBX_MEMORYLIMIT:-"128M"}"

View File

@ -1,42 +1,31 @@
FROM ubuntu:bionic FROM ubuntu:bionic
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" \
ARG VCS_REF org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
ARG APT_FLAGS_COMMON="-y" org.opencontainers.image.url="https://zabbix.com/" \
ARG APT_FLAGS_PERSISTENT="${APT_FLAGS_COMMON} --no-install-recommends" org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends" org.opencontainers.image.licenses="GPL v2.0"
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TERM=xterm \
ZBX_TYPE=frontend ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=nginx
LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-ubuntu" \
org.label-schema.vendor="Zabbix LLC" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.schema-version="1.0" \
org.label-schema.license="GPL v2.0"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
RUN set -eux && \ RUN set -eux && \
apt-get ${APT_FLAGS_COMMON} update && \ addgroup --system --gid 1995 --quiet zabbix && \
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales gnupg2 ca-certificates && \
locale-gen $LC_ALL && \
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
addgroup --system --quiet zabbix && \
adduser --quiet \ adduser --quiet \
--system --disabled-login \ --system --disabled-login \
--ingroup zabbix \ --ingroup zabbix --ingroup root \
--uid 1997 \
--home /var/lib/zabbix/ \ --home /var/lib/zabbix/ \
--no-create-home \
zabbix && \ zabbix && \
mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \ mkdir -p /etc/zabbix/web && \
chown --quiet -R zabbix:root /etc/zabbix && \ mkdir -p /var/lib/php/session && \
apt-get ${APT_FLAGS_COMMON} update && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
gpg \
dirmngr \
gpg-agent \
ca-certificates && \
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \ NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
found=''; \ found=''; \
for server in \ for server in \
@ -51,8 +40,8 @@ RUN set -eux && \
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \ test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \ DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \ echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \
apt-get ${APT_FLAGS_COMMON} update && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \ DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
curl \ curl \
nginx \ nginx \
php7.2-bcmath \ php7.2-bcmath \
@ -99,6 +88,8 @@ RUN set -eux && \
rm -f conf/zabbix.conf.php && \ rm -f conf/zabbix.conf.php && \
rm -rf tests && \ rm -rf tests && \
./locale/make_mo.sh && \ ./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
./locale/make_mo.sh && \
mkdir -p /var/lib/locales/supported.d/ && \ mkdir -p /var/lib/locales/supported.d/ && \
rm -f /var/lib/locales/supported.d/local && \ rm -f /var/lib/locales/supported.d/local && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
@ -107,25 +98,31 @@ RUN set -eux && \
dpkg-reconfigure locales && \ dpkg-reconfigure locales && \
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \ find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \ find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_COMMON} purge \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ && \
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ && \
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ && \
chown --quiet -R zabbix:root /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
chgrp -R 0 /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
chmod -R g=u /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
gettext \ gettext \
git && \ git \
apt-get ${APT_FLAGS_COMMON} autoremove && \ locales && \
apt-get ${APT_FLAGS_COMMON} clean && \ apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
EXPOSE 80/TCP 443/TCP EXPOSE 8080/TCP 8443/TCP
WORKDIR /usr/share/zabbix WORKDIR /usr/share/zabbix
VOLUME ["/etc/ssl/nginx"] VOLUME ["/etc/ssl/nginx"]
COPY ["conf/etc/supervisor/", "/etc/supervisor/"]
COPY ["conf/etc/zabbix/nginx.conf", "/etc/zabbix/"]
COPY ["conf/etc/zabbix/nginx_ssl.conf", "/etc/zabbix/"]
COPY ["conf/etc/zabbix/web/zabbix.conf.php", "/etc/zabbix/web/"]
COPY ["conf/etc/nginx/nginx.conf", "/etc/nginx/"]
COPY ["conf/etc/php/7.2/fpm/conf.d/99-zabbix.ini", "/etc/php/7.2/fpm/conf.d/"]
COPY ["docker-entrypoint.sh", "/usr/bin/"] COPY ["docker-entrypoint.sh", "/usr/bin/"]
USER 1997
ENTRYPOINT ["docker-entrypoint.sh"] ENTRYPOINT ["docker-entrypoint.sh"]

View File

@ -1,9 +0,0 @@
max_execution_time=300
memory_limit=128M
post_max_size=16M
upload_max_filesize=2M
max_input_time=300
always_populate_raw_post_date=-1
max_input_vars=10000
; date.timezone=Europe/Riga
session.save_path=/var/lib/php7

View File

@ -0,0 +1,9 @@
include=/etc/php/7.2/fpm/pool.d/*.conf
[global]
pid = /tmp/php-fpm.pid
error_log = /dev/fd/2
daemonize = no

View File

@ -0,0 +1,25 @@
[zabbix]
listen = /tmp/php-fpm.sock
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
slowlog = /dev/fd/1
php_admin_value[error_log] = /dev/fd/2
php_admin_flag[log_errors] = on
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/session
php_value[max_execution_time]= 300
php_value[memory_limit]= 128M
php_value[post_max_size]= 16M
php_value[upload_max_filesize]= 2M
php_value[max_input_time]= 300
php_value[max_input_vars]= 10000
; php_value[date.timezone]= Europe/Riga

View File

@ -51,7 +51,7 @@ server {
} }
location ~ .php$ { location ~ .php$ {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;

View File

@ -75,7 +75,7 @@ server {
} }
location ~ .php$ { location ~ .php$ {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;