diff --git a/README.md b/README.md index ba4eb11e8..edddaef82 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ pip install -r requirements.txt running: ``` -sudo nginx -c `pwd`/nginx.conf +sudo mkdir -p /mnt/nginx/ && sudo nginx -c `pwd`/nginx.conf STACK=prod gunicorn -D --workers 4 -b unix:/tmp/gunicorn.sock --worker-class gevent -t 2000 application:application ``` diff --git a/nginx-staging.conf b/nginx-staging.conf index 68e88b274..252d9d21d 100644 --- a/nginx-staging.conf +++ b/nginx-staging.conf @@ -1,8 +1,8 @@ worker_processes 1; user root nogroup; -pid /tmp/nginx.pid; -error_log /tmp/nginx.error.log; +pid /mnt/nginx/nginx.pid; +error_log /mnt/nginx/nginx.error.log; events { worker_connections 1024; @@ -14,7 +14,7 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; - access_log /tmp/nginx.access.log combined; + access_log /mnt/nginx/nginx.access.log combined; sendfile on; root /root/quay/; @@ -43,6 +43,7 @@ http { server { listen 443 default; client_max_body_size 8G; + client_body_temp_path /mnt/nginx/client_body 1 2; server_name _; keepalive_timeout 5; @@ -73,6 +74,7 @@ http { proxy_pass http://app_server; proxy_read_timeout 2000; + proxy_temp_path /mnt/nginx/proxy_temp 1 2; } } } diff --git a/nginx.conf b/nginx.conf index 536e09303..a9d460f81 100644 --- a/nginx.conf +++ b/nginx.conf @@ -41,6 +41,7 @@ http { server { listen 443 default; client_max_body_size 8G; + client_body_temp_path /mnt/nginx/client_body 1 2; server_name _; keepalive_timeout 5; @@ -71,6 +72,7 @@ http { proxy_pass http://app_server; proxy_read_timeout 2000; + proxy_temp_path /mnt/nginx/proxy_temp 1 2; } } } \ No newline at end of file diff --git a/static/js/app.js b/static/js/app.js index 09a49eb51..234a361cd 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -89,7 +89,7 @@ function getMarkedDown(string) { } // Start the application code itself. -quayApp = angular.module('quay', ['ngRoute', 'chieffancypants.loadingBar', 'restangular', 'angularMoment', 'angulartics', 'angulartics.google.analytics', 'angulartics.mixpanel', '$strap.directives', 'ngCookies'], function($provide, cfpLoadingBarProvider) { +quayApp = angular.module('quay', ['ngRoute', 'chieffancypants.loadingBar', 'restangular', 'angularMoment', 'angulartics', /*'angulartics.google.analytics',*/ 'angulartics.mixpanel', '$strap.directives', 'ngCookies'], function($provide, cfpLoadingBarProvider) { cfpLoadingBarProvider.includeSpinner = false; $provide.factory('CookieService', ['$cookies', '$cookieStore', function($cookies, $cookieStore) { @@ -286,13 +286,15 @@ quayApp = angular.module('quay', ['ngRoute', 'chieffancypants.loadingBar', 'rest if (UserService.currentUser().anonymous) { return; } - - planService.isBusinessPlan(planId, function(bus) { - if (bus) { - document.location = '/organizations/new/?plan=' + planId; - } else { - document.location = '/user?plan=' + planId; - } + + planService.getPlan(planId, function(plan) { + planService.isBusinessPlan(planId, function(bus) { + if (bus) { + document.location = '/organizations/new/?plan=' + planId; + } else { + document.location = '/user?plan=' + planId; + } + }); }); }); }; diff --git a/templates/base.html b/templates/base.html index ac8455bed..de2578ce7 100644 --- a/templates/base.html +++ b/templates/base.html @@ -78,6 +78,7 @@ b._i.push([a,e,d])};b.__SV=1.2}})(document,window.mixpanel||[]); mixpanel.init(isProd ? "50ff2b2569faa3a51c8f5724922ffb7e" : "38014a0f27e7bdc3ff8cc7cc29c869f9", { track_pageview : false, debug: !isProd });