mirror of
https://github.com/YunoHost-Apps/prometheus_ynh.git
synced 2024-09-03 20:16:01 +02:00
Fix installation on subpath
This commit is contained in:
parent
e846ca680e
commit
0f83354c47
3 changed files with 4 additions and 2 deletions
|
@ -6,7 +6,7 @@ location __PATH__ {
|
|||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
proxy_pass http://127.0.0.1:__PORT____PATH__;
|
||||
proxy_pass http://127.0.0.1:__PORT__;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
|
|
@ -9,7 +9,8 @@ Group=__APP__
|
|||
WorkingDirectory=__FINALPATH__/
|
||||
ExecStart=__FINALPATH__/prometheus \
|
||||
--config.file=__FINALPATH__/prometheus.yml --web.enable-admin-api \
|
||||
--web.external-url=__PATH__ \
|
||||
--web.external-url=__PATH__/ \
|
||||
--web.route-prefix=__PATH__/ \
|
||||
--web.listen-address=localhost:__PORT__
|
||||
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||
StandardError=inherit
|
||||
|
|
|
@ -113,6 +113,7 @@ ynh_add_systemd_config
|
|||
ynh_script_progression --message="Configuring the app..." --weight=2
|
||||
|
||||
ynh_replace_string --match_string="localhost:9090" --replace_string="localhost:$port" --target_file="$final_path/prometheus.yml"
|
||||
echo " metrics_path: $path_url/metrics" >> "$final_path/prometheus.yml"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
Loading…
Add table
Reference in a new issue