diff --git a/docker-compose_v3_centos_mysql_latest.yaml b/docker-compose_v3_centos_mysql_latest.yaml index e3d0e7863..65d776ba8 100644 --- a/docker-compose_v3_centos_mysql_latest.yaml +++ b/docker-compose_v3_centos_mysql_latest.yaml @@ -196,7 +196,7 @@ services: - mysql-server - zabbix-server healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] + test: ["CMD", "curl", "-f", "http://localhost:8080/"] interval: 10s timeout: 5s retries: 3 @@ -249,7 +249,7 @@ services: - mysql-server - zabbix-server healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] + test: ["CMD", "curl", "-f", "http://localhost:8080/"] interval: 10s timeout: 5s retries: 3 diff --git a/docker-compose_v3_centos_mysql_local.yaml b/docker-compose_v3_centos_mysql_local.yaml index fec4541b2..7565c31b4 100644 --- a/docker-compose_v3_centos_mysql_local.yaml +++ b/docker-compose_v3_centos_mysql_local.yaml @@ -212,7 +212,7 @@ services: - mysql-server - zabbix-server healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] + test: ["CMD", "curl", "-f", "http://localhost:8080/"] interval: 10s timeout: 5s retries: 3 @@ -269,7 +269,7 @@ services: - mysql-server - zabbix-server healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] + test: ["CMD", "curl", "-f", "http://localhost:8080/"] interval: 10s timeout: 5s retries: 3 diff --git a/docker-compose_v3_centos_pgsql_latest.yaml b/docker-compose_v3_centos_pgsql_latest.yaml index 7478c56c9..5bde0a70a 100644 --- a/docker-compose_v3_centos_pgsql_latest.yaml +++ b/docker-compose_v3_centos_pgsql_latest.yaml @@ -199,7 +199,7 @@ services: - postgres-server - zabbix-server healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] + test: ["CMD", "curl", "-f", "http://localhost:8080/"] interval: 10s timeout: 5s retries: 3 @@ -252,7 +252,7 @@ services: - postgres-server - zabbix-server healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] + test: ["CMD", "curl", "-f", "http://localhost:8080/"] interval: 10s timeout: 5s retries: 3 diff --git a/docker-compose_v3_centos_pgsql_local.yaml b/docker-compose_v3_centos_pgsql_local.yaml index 0cfccae68..cc400b6b6 100644 --- a/docker-compose_v3_centos_pgsql_local.yaml +++ b/docker-compose_v3_centos_pgsql_local.yaml @@ -204,7 +204,7 @@ services: - postgres-server - zabbix-server healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] + test: ["CMD", "curl", "-f", "http://localhost:8080/"] interval: 10s timeout: 5s retries: 3 @@ -258,7 +258,7 @@ services: - postgres-server - zabbix-server healthcheck: - test: ["CMD", "curl", "-f", "http://localhost"] + test: ["CMD", "curl", "-f", "http://localhost:8080/"] interval: 10s timeout: 5s retries: 3 diff --git a/snmptraps/alpine/conf/etc/supervisor/supervisord.conf b/snmptraps/alpine/conf/etc/supervisor/supervisord.conf index a1abd35a0..f8d80e461 100644 --- a/snmptraps/alpine/conf/etc/supervisor/supervisord.conf +++ b/snmptraps/alpine/conf/etc/supervisor/supervisord.conf @@ -33,4 +33,3 @@ serverurl = unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket [include] files = /etc/supervisor/conf.d/*.conf - diff --git a/snmptraps/centos/conf/etc/supervisor/conf.d/supervisord_snmptraps.conf b/snmptraps/centos/conf/etc/supervisor/conf.d/supervisord_snmptraps.conf index 89b330246..201b52c92 100644 --- a/snmptraps/centos/conf/etc/supervisor/conf.d/supervisord_snmptraps.conf +++ b/snmptraps/centos/conf/etc/supervisor/conf.d/supervisord_snmptraps.conf @@ -17,7 +17,7 @@ stdout_logfile = /dev/stdout stdout_logfile_maxbytes = 0 [program:snmptrapd] -command = /usr/sbin/%(program_name)s -m '+ALL' -M /usr/share/snmp/mibs/:/var/lib/zabbix/mibs -f -n -Lo -p /var/run/snmptrapd.pid -C -c /etc/snmp/%(program_name)s.conf +command = /usr/sbin/%(program_name)s -m '+ALL' -M /usr/share/snmp/mibs/:/var/lib/zabbix/mibs -f -n -Lo -p /var/run/snmptrapd.pid -C -c /etc/snmp/%(program_name)s.conf udp:0.0.0.0:1162 auto_start = true autorestart = true priority = 100 diff --git a/snmptraps/centos/conf/etc/supervisor/supervisord.conf b/snmptraps/centos/conf/etc/supervisor/supervisord.conf index 925bb1838..f8d80e461 100644 --- a/snmptraps/centos/conf/etc/supervisor/supervisord.conf +++ b/snmptraps/centos/conf/etc/supervisor/supervisord.conf @@ -1,17 +1,17 @@ ; supervisor config file [unix_http_server] -file = /var/run/supervisor.sock ; (the path to the socket file) +file = /tmp/supervisor.sock ; (the path to the socket file) chmod = 0700 ; sockef file mode (default 0700) username = zbx password = password [supervisord] logfile = /dev/stdout ; (main log file;default $CWD/supervisord.log) -pidfile = /var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) +pidfile = /tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid) childlogdir = /tmp ; ('AUTO' child log dir, default $TEMP) critical = critical -user = root +;user = zabbix logfile_maxbytes = 0 logfile_backupcount = 0 loglevel = info @@ -23,7 +23,7 @@ loglevel = info supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] -serverurl = unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket +serverurl = unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket ; The [include] section can just contain the "files" setting. This ; setting can list multiple files (separated by whitespace or diff --git a/web-apache-mysql/alpine/docker-entrypoint.sh b/web-apache-mysql/alpine/docker-entrypoint.sh index c0df035c1..c6fd4f7f7 100755 --- a/web-apache-mysql/alpine/docker-entrypoint.sh +++ b/web-apache-mysql/alpine/docker-entrypoint.sh @@ -57,6 +57,10 @@ file_env() { unset "$fileVar" } +prepare_system() { + echo "** Preparing the system" +} + escape_spec_char() { local var_value=$1 @@ -199,6 +203,10 @@ prepare_web_server() { fi } +clear_deploy() { + echo "** Cleaning the system" +} + prepare_zbx_web_config() { local server_name="" diff --git a/web-apache-mysql/centos/Dockerfile b/web-apache-mysql/centos/Dockerfile index 992b93899..1beda6fa0 100644 --- a/web-apache-mysql/centos/Dockerfile +++ b/web-apache-mysql/centos/Dockerfile @@ -31,6 +31,12 @@ RUN set -eux && \ php-mbstring \ php-mysql \ php-xml && \ + rm -f "/etc/httpd/conf.d/default.conf" && \ + rm -f "/etc/httpd/conf.d/ssl.conf" && \ + sed -ri \ + -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ + -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ + "/etc/httpd/conf/httpd.conf" && \ sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf && \ yum -y clean all && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ @@ -72,6 +78,9 @@ RUN set -eux && \ chown --quiet -R zabbix:root /etc/httpd/ /etc/php.d/ /etc/php.ini && \ chgrp -R 0 /etc/httpd/ /etc/php.d/ /etc/php.ini && \ chmod -R g=u /etc/httpd/ /etc/php.d/ /etc/php.ini && \ + chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \ + chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \ + chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ yum -y history undo `yum -q history | sed -n 3p |column -t | cut -d' ' -f1` && \ yum -y clean all && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ diff --git a/web-apache-mysql/centos/conf/etc/httpd/conf.d/99-zabbix.conf b/web-apache-mysql/centos/conf/etc/httpd/conf.d/99-zabbix.conf new file mode 100644 index 000000000..7b1080149 --- /dev/null +++ b/web-apache-mysql/centos/conf/etc/httpd/conf.d/99-zabbix.conf @@ -0,0 +1,3 @@ + + PidFile "/tmp/httpd.pid" + \ No newline at end of file diff --git a/web-apache-mysql/centos/docker-entrypoint.sh b/web-apache-mysql/centos/docker-entrypoint.sh index b9714bc87..a3304cc18 100755 --- a/web-apache-mysql/centos/docker-entrypoint.sh +++ b/web-apache-mysql/centos/docker-entrypoint.sh @@ -57,6 +57,10 @@ file_env() { unset "$fileVar" } +prepare_system() { + echo "** Preparing the system" +} + escape_spec_char() { local var_value=$1 @@ -178,7 +182,7 @@ check_db_connect() { } prepare_web_server() { - APACHE_SITES_DIR=/etc/apache2/conf.d + APACHE_SITES_DIR=/etc/httpd/conf.d echo "** Adding Zabbix virtual host (HTTP)" if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then @@ -199,6 +203,10 @@ prepare_web_server() { fi } +clear_deploy() { + echo "** Cleaning the system" +} + prepare_zbx_web_config() { local server_name="" diff --git a/web-nginx-mysql/centos/Dockerfile b/web-nginx-mysql/centos/Dockerfile index 6af37b7db..0a91f4692 100644 --- a/web-nginx-mysql/centos/Dockerfile +++ b/web-nginx-mysql/centos/Dockerfile @@ -32,6 +32,7 @@ RUN set -eux && \ php-xml \ supervisor && \ rm -f /etc/nginx/conf.d/*.conf && \ + rm -f /etc/php-fpm.d/www.conf && \ yum -y clean all && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /etc/udev/hwdb.bin /root/.pki diff --git a/web-nginx-mysql/centos/conf/etc/php-fpm.conf b/web-nginx-mysql/centos/conf/etc/php-fpm.conf index 7a71309b9..b88fd8295 100644 --- a/web-nginx-mysql/centos/conf/etc/php-fpm.conf +++ b/web-nginx-mysql/centos/conf/etc/php-fpm.conf @@ -12,7 +12,6 @@ ; Relative path can also be used. They will be prefixed by: ; - the global prefix if it's been set (-p argument) ; - /usr otherwise -include = /etc/php-fpm.d/*.conf ;;;;;;;;;;;;;;;;;; ; Global Options ; diff --git a/web-nginx-mysql/centos/conf/etc/php.d/99-zabbix.ini b/web-nginx-mysql/centos/conf/etc/php.d/99-zabbix.ini index 6b922165e..de8fc6904 100644 --- a/web-nginx-mysql/centos/conf/etc/php.d/99-zabbix.ini +++ b/web-nginx-mysql/centos/conf/etc/php.d/99-zabbix.ini @@ -6,4 +6,3 @@ max_input_time=300 always_populate_raw_post_data=-1 max_input_vars=10000 ; date.timezone=Europe/Riga -;session.save_path=/var/lib/php/ diff --git a/web-nginx-mysql/centos/conf/etc/zabbix/nginx.conf b/web-nginx-mysql/centos/conf/etc/zabbix/nginx.conf index 3bde42701..62c9be112 100644 --- a/web-nginx-mysql/centos/conf/etc/zabbix/nginx.conf +++ b/web-nginx-mysql/centos/conf/etc/zabbix/nginx.conf @@ -1,5 +1,5 @@ server { - listen 80; + listen 8080; server_name zabbix; index index.php; @@ -51,7 +51,7 @@ server { } location ~ .php$ { - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/web-nginx-mysql/centos/conf/etc/zabbix/nginx_ssl.conf b/web-nginx-mysql/centos/conf/etc/zabbix/nginx_ssl.conf index b38103186..844ff0f07 100644 --- a/web-nginx-mysql/centos/conf/etc/zabbix/nginx_ssl.conf +++ b/web-nginx-mysql/centos/conf/etc/zabbix/nginx_ssl.conf @@ -1,5 +1,5 @@ server { - listen 443 ssl http2; + listen 8443 ssl http2; server_name zabbix; server_name_in_redirect off; @@ -75,7 +75,7 @@ server { } location ~ .php$ { - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/web-nginx-mysql/centos/docker-entrypoint.sh b/web-nginx-mysql/centos/docker-entrypoint.sh index 2dc3da62c..abb969b23 100755 --- a/web-nginx-mysql/centos/docker-entrypoint.sh +++ b/web-nginx-mysql/centos/docker-entrypoint.sh @@ -247,7 +247,7 @@ prepare_zbx_web_config() { ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" - PHP_CONFIG_FILE="/etc/php7/conf.d/99-zabbix.ini" + PHP_CONFIG_FILE="/etc/php.d/99-zabbix.ini" update_config_var "$PHP_CONFIG_FILE" "max_execution_time" "${ZBX_MAXEXECUTIONTIME:-"600"}" update_config_var "$PHP_CONFIG_FILE" "memory_limit" "${ZBX_MEMORYLIMIT:-"128M"}"