mirror of
https://github.com/demostf/proxy
synced 2026-06-03 12:04:07 +02:00
prepare for metrics
This commit is contained in:
parent
d5e7839632
commit
de009f8f49
4 changed files with 12 additions and 1 deletions
|
|
@ -11,5 +11,6 @@ ENV API_FASTCGI=api:9000
|
|||
ENV FRONTEND=frontend
|
||||
ENV SYNC=sync
|
||||
ENV MAPS=maps
|
||||
ENV METRICS=metrics
|
||||
|
||||
CMD ["/bin/bash", "/entrypoint.sh"]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
for f in /etc/nginx/conf.d/*.conf
|
||||
do
|
||||
envsubst '${HOST},${API_FASTCGI},${FRONTEND},${SYNC},${MAPS}' < "$f" | sponge "$f"
|
||||
envsubst '${HOST},${API_FASTCGI},${FRONTEND},${SYNC},${MAPS},${METRICS}' < "$f" | sponge "$f"
|
||||
done
|
||||
|
||||
/scripts/start_nginx_certbot.sh
|
||||
|
|
|
|||
|
|
@ -59,6 +59,12 @@ http {
|
|||
|
||||
access_log /logs/access.log json_analytics;
|
||||
|
||||
log_format upstream_time '$remote_addr $host - $remote_user [$time_local] '
|
||||
'"$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent" '
|
||||
'rt=$request_time uct="$upstream_connect_time" uht="$upstream_header_time" urt="$upstream_response_time"';
|
||||
access_log /logs/nginxlog.log upstream_time;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,4 +33,8 @@ server {
|
|||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME /app/src/public/upload.php;
|
||||
}
|
||||
|
||||
location /metrics {
|
||||
proxy_pass http://${METRICS};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue