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

@ -19,7 +19,13 @@ RUN set -eux && \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /var/lib/php/session && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
gpg \
dirmngr \
gpg-agent \
ca-certificates && \
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
found=''; \
for server in \
@ -50,8 +56,8 @@ RUN set -eux && \
supervisor && \
rm -f /etc/nginx/conf.d/*.conf && \
rm -rf /var/cache/nginx/ && \
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
wget && \
rm -f /etc/php/7.2/fpm/pool.d/www.conf && \
DEBIAN_FRONTEND=noninteractive apt-get -y purge curl gpg dirmngr gpg-agent && \
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/*
@ -96,6 +102,12 @@ RUN set -eux && \
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 \
git \
@ -112,4 +124,6 @@ VOLUME ["/etc/ssl/nginx"]
COPY ["docker-entrypoint.sh", "/usr/bin/"]
USER 1997
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$ {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;

View File

@ -75,7 +75,7 @@ server {
}
location ~ .php$ {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_index index.php;
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"
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[memory_limit]" "${ZBX_MEMORYLIMIT:-"128M"}"