homeassistant: Share pgadmin4 from different subdirectory

This commit is contained in:
Thomas Basler 2025-01-06 17:41:49 +01:00
parent 701d95ce84
commit ebd11e8738
4 changed files with 7 additions and 3 deletions

View File

@ -41,6 +41,7 @@ mosquitto_bridges:
ha_version: "2025.1.0"
ha_pg_db_pass: "{{ vault_ha_pg_db_pass }}"
ha_pg_grafana_db_pass: "{{ vault_ha_pg_grafana_db_pass }}"
pgadmin4_subfolder: "/api/ingress/pgadmin4"
pgadmin4_db_password: "{{ vault_pgadmin4_db_password }}"
pgadmin4_initial_user_email: noby@binary-kitchen.de
pgadmin4_initial_user_password: "{{ vault_pgadmin4_initial_user_password }}"

View File

@ -32,8 +32,10 @@ server {
proxy_pass http://localhost:3000;
}
location = /pgadmin4 { rewrite ^ /pgadmin4/; }
location /pgadmin4 { try_files $uri @pgadmin4; }
location /api/ingress/pgadmin4 {
try_files $uri @pgadmin4;
}
location @pgadmin4 {
include uwsgi_params;
uwsgi_pass unix:/run/pgadmin4/pgadmin4.sock;

View File

@ -5,6 +5,7 @@ pgadmin4_db_database: pgadmin4
pgadmin4_db_user: pgadmin4
pgadmin4_db_password: xxxxx
pgadmin4_conf_dir: /etc/pgadmin
pgadmin4_subfolder: /pgadmin4
pgadmin4_initial_user_email: admin@admin.com
pgadmin4_initial_user_password: admin42

View File

@ -16,7 +16,7 @@ ExecStart=uwsgi \
--threads 25 \
--chdir /usr/pgadmin4/web/ \
--manage-script-name \
--mount /pgadmin4=pgAdmin4:app
--mount {{ pgadmin4_subfolder }}=pgAdmin4:app
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -INT $MAINPID
Restart=always