summaryrefslogtreecommitdiff
path: root/auth-server-poc/config
diff options
context:
space:
mode:
Diffstat (limited to 'auth-server-poc/config')
-rw-r--r--auth-server-poc/config/nginx.conf23
-rw-r--r--auth-server-poc/config/nginx_app.conf17
-rw-r--r--auth-server-poc/config/supervisord_app.conf15
-rw-r--r--auth-server-poc/config/uwsgi.ini13
4 files changed, 68 insertions, 0 deletions
diff --git a/auth-server-poc/config/nginx.conf b/auth-server-poc/config/nginx.conf
new file mode 100644
index 0000000..6b17bd0
--- /dev/null
+++ b/auth-server-poc/config/nginx.conf
@@ -0,0 +1,23 @@
+user www-data;
+worker_processes auto;
+pid /tmp/nginx.pid;
+include /etc/nginx/modules-enabled/*.conf;
+
+events {
+ worker_connections 768;
+}
+
+http {
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ keepalive_timeout 65;
+ types_hash_max_size 2048;
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+ access_log /var/log/nginx/access.log;
+ error_log /var/log/nginx/error.log;
+ gzip on;
+ include /etc/nginx/conf.d/*.conf;
+ include /etc/nginx/sites-enabled/*;
+}
diff --git a/auth-server-poc/config/nginx_app.conf b/auth-server-poc/config/nginx_app.conf
new file mode 100644
index 0000000..7b1e6f9
--- /dev/null
+++ b/auth-server-poc/config/nginx_app.conf
@@ -0,0 +1,17 @@
+server {
+ listen 80;
+ server_name auth-server-poc;
+ client_max_body_size 200M;
+
+ location / {
+ limit_except OPTIONS {
+ auth_basic "auth-server-poc static auth";
+ auth_basic_user_file "/opt/auth-server-poc/userdb/.htpasswd";
+ }
+ uwsgi_pass unix:///tmp/uwsgi.sock;
+ default_type application/json;
+ include uwsgi_params;
+ uwsgi_param REMOTE_USER $remote_user;
+ uwsgi_param AUTH_TYPE Basic;
+ }
+}
diff --git a/auth-server-poc/config/supervisord_app.conf b/auth-server-poc/config/supervisord_app.conf
new file mode 100644
index 0000000..3a03f32
--- /dev/null
+++ b/auth-server-poc/config/supervisord_app.conf
@@ -0,0 +1,15 @@
+[supervisord]
+nodaemon=true
+user=www-data
+logfile=/tmp/supervisord.log
+loglevel=debug
+pidfile=/tmp/supervisord.pid
+childlogdir=/tmp
+
+[program:uwsgi]
+command = /usr/local/bin/uwsgi --ini /opt/auth-server-poc/uwsgi.ini
+autorestart=true
+
+[program:nginx]
+command=/usr/sbin/nginx -g "daemon off;"
+autorestart=true
diff --git a/auth-server-poc/config/uwsgi.ini b/auth-server-poc/config/uwsgi.ini
new file mode 100644
index 0000000..492b30c
--- /dev/null
+++ b/auth-server-poc/config/uwsgi.ini
@@ -0,0 +1,13 @@
+[uwsgi]
+uid=www-data
+gid=www-data
+chdir = /opt/auth-server-poc/src/
+callable = app
+module = app
+socket = /tmp/uwsgi.sock
+master = true
+# uwsgi websockets only allow max 1 process?
+processes = 1
+chmod-socket = 666
+enable-threads = true
+virtualenv = /opt/auth-server-poc