summaryrefslogtreecommitdiff
path: root/roles/monitoring/graphite/web/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/monitoring/graphite/web/templates')
-rw-r--r--roles/monitoring/graphite/web/templates/nginx-vhost.conf.j220
-rw-r--r--roles/monitoring/graphite/web/templates/uwsgi-app.ini.j28
2 files changed, 28 insertions, 0 deletions
diff --git a/roles/monitoring/graphite/web/templates/nginx-vhost.conf.j2 b/roles/monitoring/graphite/web/templates/nginx-vhost.conf.j2
new file mode 100644
index 00000000..48b6ef73
--- /dev/null
+++ b/roles/monitoring/graphite/web/templates/nginx-vhost.conf.j2
@@ -0,0 +1,20 @@
+server {
+ listen {{ graphite_web_nginx_listen }};
+
+ server_name _;
+
+ location / {
+ include uwsgi_params;
+ uwsgi_pass 127.0.0.1:{{ graphite_web_uwsgi_port }};
+ }
+ rewrite ^/admin(.*)admin/([^/]+)/([^/]+)$ /media/$2/$3 redirect;
+ location /media {
+ alias /usr/share/python-django-common/django/contrib/admin/static/admin/;
+ }
+ location /static/ {
+ alias /usr/share/graphite-web/static/;
+ }
+
+ access_log /var/log/nginx/access-graphite.log;
+ error_log /var/log/nginx/error-graphite.log;
+}
diff --git a/roles/monitoring/graphite/web/templates/uwsgi-app.ini.j2 b/roles/monitoring/graphite/web/templates/uwsgi-app.ini.j2
new file mode 100644
index 00000000..e5b01a04
--- /dev/null
+++ b/roles/monitoring/graphite/web/templates/uwsgi-app.ini.j2
@@ -0,0 +1,8 @@
+[uwsgi]
+plugin = python3
+processes = 2
+socket = 127.0.0.1:{{ graphite_web_uwsgi_port }}
+gid = _graphite
+uid = _graphite
+chdir = /usr/share/graphite-web
+wsgi-file = /usr/share/graphite-web/graphite.wsgi