mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 09:27:03 +03:00
Change php-fpm to listen on :9000 to expose prometheus metrics via php-fpm_exporter
This commit is contained in:
parent
c117d8baa1
commit
47072710b2
7 changed files with 48 additions and 6 deletions
|
|
@ -107,4 +107,5 @@ RUN set -eux; \
|
||||||
WORKDIR /snappymail
|
WORKDIR /snappymail
|
||||||
VOLUME /var/lib/snappymail
|
VOLUME /var/lib/snappymail
|
||||||
EXPOSE 8888
|
EXPOSE 8888
|
||||||
|
EXPOSE 9000
|
||||||
CMD ["/entrypoint.sh"]
|
CMD ["/entrypoint.sh"]
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ http {
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
fastcgi_param HTTP_PROXY "";
|
fastcgi_param HTTP_PROXY "";
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
fastcgi_pass unix:/tmp/php-fpm.sock;
|
fastcgi_pass 127.0.0.1:9000;
|
||||||
fastcgi_intercept_errors on;
|
fastcgi_intercept_errors on;
|
||||||
fastcgi_request_buffering off;
|
fastcgi_request_buffering off;
|
||||||
fastcgi_param REMOTE_ADDR $http_x_real_ip;
|
fastcgi_param REMOTE_ADDR $http_x_real_ip;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ error_log = /dev/stderr
|
||||||
log_buffering = no
|
log_buffering = no
|
||||||
|
|
||||||
[default]
|
[default]
|
||||||
listen = /tmp/php-fpm.sock
|
listen = 9000
|
||||||
user = www-data
|
user = www-data
|
||||||
listen.owner = www-data
|
listen.owner = www-data
|
||||||
listen.group = www-data
|
listen.group = www-data
|
||||||
|
|
@ -15,6 +15,7 @@ pm.max_requests = 500
|
||||||
catch_workers_output = yes
|
catch_workers_output = yes
|
||||||
decorate_workers_output = no
|
decorate_workers_output = no
|
||||||
chdir = /
|
chdir = /
|
||||||
|
pm.status_path = /status
|
||||||
php_admin_value[log_errors] = On
|
php_admin_value[log_errors] = On
|
||||||
php_admin_value[expose_php] = Off
|
php_admin_value[expose_php] = Off
|
||||||
php_admin_value[display_errors] = Off
|
php_admin_value[display_errors] = Off
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
snappymail:
|
snappymail:
|
||||||
image: leojonathanoh/snappymail:merge
|
image: leojonathanoh/snappymail:pr-1
|
||||||
ports:
|
ports:
|
||||||
- 8888:8888
|
- 8888:8888
|
||||||
volumes:
|
volumes:
|
||||||
|
|
@ -12,6 +12,16 @@ services:
|
||||||
- redis-network
|
- redis-network
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
# This provides prometheus metrics for snappymail's php-fpm
|
||||||
|
php-fpm-exporter:
|
||||||
|
image: hipages/php-fpm_exporter:2.2.0
|
||||||
|
ports:
|
||||||
|
- 9253:9253
|
||||||
|
environment:
|
||||||
|
- PHP_FPM_SCRAPE_URI=tcp://snappymail:9000/status
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: mariadb:10
|
image: mariadb:10
|
||||||
environment:
|
environment:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
snappymail:
|
snappymail:
|
||||||
image: leojonathanoh/snappymail:merge
|
image: leojonathanoh/snappymail:pr-1
|
||||||
ports:
|
ports:
|
||||||
- 8888:8888
|
- 8888:8888
|
||||||
volumes:
|
volumes:
|
||||||
|
|
@ -12,6 +12,16 @@ services:
|
||||||
- redis-network
|
- redis-network
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
# This provides prometheus metrics for snappymail's php-fpm
|
||||||
|
php-fpm-exporter:
|
||||||
|
image: hipages/php-fpm_exporter:2.2.0
|
||||||
|
ports:
|
||||||
|
- 9253:9253
|
||||||
|
environment:
|
||||||
|
- PHP_FPM_SCRAPE_URI=tcp://snappymail:9000/status
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:15-alpine
|
image: postgres:15-alpine
|
||||||
environment:
|
environment:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
snappymail:
|
snappymail:
|
||||||
image: leojonathanoh/snappymail:merge
|
image: leojonathanoh/snappymail:pr-1
|
||||||
ports:
|
ports:
|
||||||
- 8888:8888
|
- 8888:8888
|
||||||
volumes:
|
volumes:
|
||||||
|
|
@ -10,6 +10,16 @@ services:
|
||||||
- default
|
- default
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
# This provides prometheus metrics for snappymail's php-fpm
|
||||||
|
php-fpm-exporter:
|
||||||
|
image: hipages/php-fpm_exporter:2.2.0
|
||||||
|
ports:
|
||||||
|
- 9253:9253
|
||||||
|
environment:
|
||||||
|
- PHP_FPM_SCRAPE_URI=tcp://snappymail:9000/status
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ services:
|
||||||
|
|
||||||
# snappymail will be available at: https://snappymail.example.com
|
# snappymail will be available at: https://snappymail.example.com
|
||||||
snappymail:
|
snappymail:
|
||||||
image: leojonathanoh/snappymail:merge
|
image: leojonathanoh/snappymail:pr-1
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.docker.network=traefik-network"
|
- "traefik.docker.network=traefik-network"
|
||||||
|
|
@ -62,6 +62,16 @@ services:
|
||||||
- traefik-network
|
- traefik-network
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
# This provides prometheus metrics for snappymail's php-fpm
|
||||||
|
php-fpm-exporter:
|
||||||
|
image: hipages/php-fpm_exporter:2.2.0
|
||||||
|
ports:
|
||||||
|
- 9253:9253
|
||||||
|
environment:
|
||||||
|
- PHP_FPM_SCRAPE_URI=tcp://snappymail:9000/status
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
traefik-network:
|
traefik-network:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue