From bfb5e8f8c852c72055d5d8ef8bb5e6e7ff3974b9 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Tue, 14 Jan 2025 02:53:25 +0900 Subject: [PATCH] Migrate to PHP-FPM for all Web images --- .../alpine/conf/etc/zabbix/apache_ssl.conf | 4 ++-- .../ubuntu/conf/etc/apache2/includes.conf | 10 ++++----- .../ubuntu/conf/etc/apache2/includes.conf | 10 ++++----- .../ubuntu/docker-entrypoint.sh | 2 +- .../ubuntu/docker-entrypoint.sh | 2 +- .../ubuntu/docker-entrypoint.sh | 4 ++-- docker-compose_v3_ubuntu_pgsql_local.yaml | 21 ++++++++++--------- 7 files changed, 27 insertions(+), 26 deletions(-) diff --git a/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/apache_ssl.conf b/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/apache_ssl.conf index b46e7f800..768da0d1b 100644 --- a/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/apache_ssl.conf +++ b/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/apache_ssl.conf @@ -1,5 +1,5 @@ -LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so -LoadModule socache_shmcb_module /usr/lib/apache2/modules/mod_socache_shmcb.so +LoadModule ssl_module modules/mod_ssl.so +LoadModule socache_shmcb_module modules/mod_socache_shmcb.so Listen 8443 diff --git a/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/apache2/includes.conf b/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/apache2/includes.conf index f6d7bdec1..a7e8f77d2 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/apache2/includes.conf +++ b/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/apache2/includes.conf @@ -1,8 +1,8 @@ IncludeOptional /etc/apache2/modules.conf -IncludeOptional mods-enabled/mime.conf -IncludeOptional mods-enabled/negotiation.conf -IncludeOptional mods-enabled/reqtimeout.conf -IncludeOptional mods-enabled/setenvif.conf +IncludeOptional /etc/apache2/mods-enabled/mime.conf +IncludeOptional /etc/apache2/mods-enabled/negotiation.conf +IncludeOptional /etc/apache2/mods-enabled/reqtimeout.conf +IncludeOptional /etc/apache2/mods-enabled/setenvif.conf -IncludeOptional sites-enabled/*.conf +IncludeOptional /etc/apache2/sites-enabled/*.conf diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/apache2/includes.conf b/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/apache2/includes.conf index f6d7bdec1..a7e8f77d2 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/apache2/includes.conf +++ b/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/apache2/includes.conf @@ -1,8 +1,8 @@ IncludeOptional /etc/apache2/modules.conf -IncludeOptional mods-enabled/mime.conf -IncludeOptional mods-enabled/negotiation.conf -IncludeOptional mods-enabled/reqtimeout.conf -IncludeOptional mods-enabled/setenvif.conf +IncludeOptional /etc/apache2/mods-enabled/mime.conf +IncludeOptional /etc/apache2/mods-enabled/negotiation.conf +IncludeOptional /etc/apache2/mods-enabled/reqtimeout.conf +IncludeOptional /etc/apache2/mods-enabled/setenvif.conf -IncludeOptional sites-enabled/*.conf +IncludeOptional /etc/apache2/sites-enabled/*.conf diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh index 2cf145dde..b58b50b2b 100755 --- a/Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh @@ -179,7 +179,7 @@ prepare_web_server() { export APACHE_SERVER_SIGNATURE="Off" fi - mkdir -p /tmp/httpd + mkdir -p /tmp/apache2 } prepare_zbx_php_config() { diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh index 89cc654ef..c0899cdeb 100755 --- a/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh @@ -24,7 +24,7 @@ fi # Default directories # Nginx main configuration file -NGINX_MAIN_FILE="/etc/nginx/nginx.conf" +NGINX_CONF_FILE="/etc/nginx/nginx.conf" # Nginx virtual hosts configuration directory NGINX_CONFD_DIR="/etc/nginx/http.d" # Directory with SSL certificate files for Nginx diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh index 2ec1e6d39..268e49c57 100755 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh @@ -24,9 +24,9 @@ fi # Default directories # Nginx main configuration file -NGINX_MAIN_FILE="/etc/nginx/nginx.conf" +NGINX_CONF_FILE="/etc/nginx/nginx.conf" # Nginx virtual hosts configuration directory -NGINX_CONFD_DIR="/etc/nginx/http.d" +NGINX_CONFD_DIR="/etc/nginx/conf.d" # Directory with SSL certificate files for Nginx NGINX_SSL_CONFIG_DIR="/etc/ssl/nginx" # PHP-FPM configuration file diff --git a/docker-compose_v3_ubuntu_pgsql_local.yaml b/docker-compose_v3_ubuntu_pgsql_local.yaml index 83b53122a..c819c1eb1 100644 --- a/docker-compose_v3_ubuntu_pgsql_local.yaml +++ b/docker-compose_v3_ubuntu_pgsql_local.yaml @@ -3,7 +3,7 @@ services: build: context: ./Dockerfiles/build-base/${UBUNTU_OS_TAG_SHORT} cache_from: - - "${UBUNTU_CACHE_FROM}" + - "${UBUNTU_BASE_IMAGE}" args: OS_BASE_IMAGE: ${UBUNTU_BASE_IMAGE} image: ${BUILD_BASE_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX} @@ -62,7 +62,7 @@ services: build: context: ./Dockerfiles/server-pgsql/${UBUNTU_OS_TAG_SHORT} cache_from: - - "${UBUNTU_CACHE_FROM}" + - "${UBUNTU_BASE_IMAGE}" args: OS_BASE_IMAGE: ${UBUNTU_BASE_IMAGE} BUILD_BASE_IMAGE: ${BUILD_BASE_PGSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX} @@ -80,7 +80,7 @@ services: build: context: ./Dockerfiles/proxy-sqlite3/${UBUNTU_OS_TAG_SHORT} cache_from: - - "${UBUNTU_CACHE_FROM}" + - "${UBUNTU_BASE_IMAGE}" args: OS_BASE_IMAGE: ${UBUNTU_BASE_IMAGE} BUILD_BASE_IMAGE: ${BUILD_BASE_SQLITE3_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX} @@ -97,7 +97,7 @@ services: build: context: ./Dockerfiles/proxy-mysql/${UBUNTU_OS_TAG_SHORT} cache_from: - - "${UBUNTU_CACHE_FROM}" + - "${UBUNTU_BASE_IMAGE}" args: OS_BASE_IMAGE: ${UBUNTU_BASE_IMAGE} BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX} @@ -109,13 +109,14 @@ services: com.zabbix.os: "${UBUNTU_OS_TAG}" zabbix-web-apache-pgsql: + user: root extends: file: compose_zabbix_components.yaml service: web-apache-pgsql build: context: ./Dockerfiles/web-apache-pgsql/${UBUNTU_OS_TAG_SHORT} cache_from: - - "${UBUNTU_CACHE_FROM}" + - "${UBUNTU_BASE_IMAGE}" args: OS_BASE_IMAGE: ${UBUNTU_BASE_IMAGE} BUILD_BASE_IMAGE: ${BUILD_BASE_PGSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX} @@ -133,7 +134,7 @@ services: build: context: ./Dockerfiles/web-nginx-pgsql/${UBUNTU_OS_TAG_SHORT} cache_from: - - "${UBUNTU_CACHE_FROM}" + - "${UBUNTU_BASE_IMAGE}" args: OS_BASE_IMAGE: ${UBUNTU_BASE_IMAGE} BUILD_BASE_IMAGE: ${BUILD_BASE_PGSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX} @@ -151,7 +152,7 @@ services: build: context: ./Dockerfiles/agent/${UBUNTU_OS_TAG_SHORT} cache_from: - - "${UBUNTU_CACHE_FROM}" + - "${UBUNTU_BASE_IMAGE}" args: OS_BASE_IMAGE: ${UBUNTU_BASE_IMAGE} BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX} @@ -168,7 +169,7 @@ services: build: context: ./Dockerfiles/java-gateway/${UBUNTU_OS_TAG_SHORT} cache_from: - - "${UBUNTU_CACHE_FROM}" + - "${UBUNTU_BASE_IMAGE}" args: OS_BASE_IMAGE: ${UBUNTU_BASE_IMAGE} BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX} @@ -185,7 +186,7 @@ services: build: context: ./Dockerfiles/snmptraps/${UBUNTU_OS_TAG_SHORT} cache_from: - - "${UBUNTU_CACHE_FROM}" + - "${UBUNTU_BASE_IMAGE}" args: OS_BASE_IMAGE: ${UBUNTU_BASE_IMAGE} image: zabbix-snmptraps:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX} @@ -201,7 +202,7 @@ services: build: context: ./Dockerfiles/web-service/${UBUNTU_OS_TAG_SHORT} cache_from: - - "${UBUNTU_CACHE_FROM}" + - "${UBUNTU_BASE_IMAGE}" args: OS_BASE_IMAGE: ${UBUNTU_BASE_IMAGE} BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}