mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-08-14 02:38:37 +02:00
Migrate to PHP-FPM for all Web images
This commit is contained in:
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
ZABBIX_CONF_DIR="/etc/zabbix" \
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
|
||||
@ -28,7 +29,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "${ZABBIX_WWW_ROOT}"]
|
||||
COPY ["conf/etc/", "/etc/"]
|
||||
|
||||
RUN set -eux && \
|
||||
@ -84,17 +85,17 @@ RUN set -eux && \
|
||||
rm -f /etc/nginx/http.d/*.conf && \
|
||||
ln -sf /dev/stdout /var/log/nginx/access.log && \
|
||||
ln -sf /dev/stderr /var/log/nginx/error.log && \
|
||||
cd /usr/share/zabbix/ && \
|
||||
cd ${ZABBIX_WWW_ROOT}/ && \
|
||||
rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \
|
||||
rm -rf tests && \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \
|
||||
find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "${ZABBIX_WWW_ROOT}/conf/maintenance.inc.php" && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_WWW_ROOT}/include/defines.inc.php ${ZABBIX_WWW_ROOT}/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_WWW_ROOT}/include/defines.inc.php ${ZABBIX_WWW_ROOT}/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_WWW_ROOT}/include/defines.inc.php ${ZABBIX_WWW_ROOT}/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/nginx/ /etc/php83/php-fpm.d/ /etc/php83/php-fpm.conf && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php83/php-fpm.d/ /etc/php83/php-fpm.conf && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php83/php-fpm.d/ /etc/php83/php-fpm.conf && \
|
||||
@ -102,9 +103,12 @@ RUN set -eux && \
|
||||
chgrp -R 0 /var/lib/php/session/ /var/lib/nginx/ && \
|
||||
chmod -R g=u /var/lib/php/session/ /var/lib/nginx/
|
||||
|
||||
HEALTHCHECK --interval=1m30s --timeout=3s --retries=3 --start-period=40s --start-interval=5s \
|
||||
CMD curl -f http://localhost:8080/ping || exit 1
|
||||
|
||||
EXPOSE 8080/TCP 8443/TCP
|
||||
|
||||
WORKDIR /usr/share/zabbix
|
||||
WORKDIR ${ZABBIX_WWW_ROOT}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
|
Reference in New Issue
Block a user