Merge branch 'master' of https://bitbucket.org/yackob03/quay
This commit is contained in:
commit
5778076abb
6 changed files with 21 additions and 8 deletions
|
@ -20,7 +20,7 @@ pip install -r requirements.txt
|
||||||
running:
|
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
|
STACK=prod gunicorn -D --workers 4 -b unix:/tmp/gunicorn.sock --worker-class gevent -t 2000 application:application
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -327,8 +327,11 @@ def create_confirm_email_code(user):
|
||||||
|
|
||||||
|
|
||||||
def confirm_user_email(code):
|
def confirm_user_email(code):
|
||||||
code = EmailConfirmation.get(EmailConfirmation.code == code,
|
try:
|
||||||
EmailConfirmation.email_confirm == True)
|
code = EmailConfirmation.get(EmailConfirmation.code == code,
|
||||||
|
EmailConfirmation.email_confirm == True)
|
||||||
|
except EmailConfirmation.DoesNotExist:
|
||||||
|
raise DataModelException('Invalid email confirmation code.')
|
||||||
|
|
||||||
user = code.user
|
user = code.user
|
||||||
user.verified = True
|
user.verified = True
|
||||||
|
@ -544,7 +547,7 @@ def get_visible_repositories(username=None, include_public=True, limit=None,
|
||||||
where_clause = new_clause
|
where_clause = new_clause
|
||||||
|
|
||||||
if limit:
|
if limit:
|
||||||
query.limit(limit)
|
query = query.limit(limit)
|
||||||
|
|
||||||
return query.where(where_clause)
|
return query.where(where_clause)
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,11 @@ def github_oauth_callback():
|
||||||
@app.route('/confirm', methods=['GET'])
|
@app.route('/confirm', methods=['GET'])
|
||||||
def confirm_email():
|
def confirm_email():
|
||||||
code = request.values['code']
|
code = request.values['code']
|
||||||
user = model.confirm_user_email(code)
|
|
||||||
|
try:
|
||||||
|
user = model.confirm_user_email(code)
|
||||||
|
except model.DataModelException as ex:
|
||||||
|
return redirect(url_for('signin'))
|
||||||
|
|
||||||
common_login(user)
|
common_login(user)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
worker_processes 1;
|
worker_processes 1;
|
||||||
|
|
||||||
user root nogroup;
|
user root nogroup;
|
||||||
pid /tmp/nginx.pid;
|
pid /mnt/nginx/nginx.pid;
|
||||||
error_log /tmp/nginx.error.log;
|
error_log /mnt/nginx/nginx.error.log;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 1024;
|
worker_connections 1024;
|
||||||
|
@ -14,7 +14,7 @@ http {
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
|
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
access_log /tmp/nginx.access.log combined;
|
access_log /mnt/nginx/nginx.access.log combined;
|
||||||
sendfile on;
|
sendfile on;
|
||||||
|
|
||||||
root /root/quay/;
|
root /root/quay/;
|
||||||
|
@ -43,6 +43,7 @@ http {
|
||||||
server {
|
server {
|
||||||
listen 443 default;
|
listen 443 default;
|
||||||
client_max_body_size 8G;
|
client_max_body_size 8G;
|
||||||
|
client_body_temp_path /mnt/nginx/client_body 1 2;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
keepalive_timeout 5;
|
keepalive_timeout 5;
|
||||||
|
@ -73,6 +74,7 @@ http {
|
||||||
|
|
||||||
proxy_pass http://app_server;
|
proxy_pass http://app_server;
|
||||||
proxy_read_timeout 2000;
|
proxy_read_timeout 2000;
|
||||||
|
proxy_temp_path /mnt/nginx/proxy_temp 1 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ http {
|
||||||
server {
|
server {
|
||||||
listen 443 default;
|
listen 443 default;
|
||||||
client_max_body_size 8G;
|
client_max_body_size 8G;
|
||||||
|
client_body_temp_path /mnt/nginx/client_body 1 2;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
keepalive_timeout 5;
|
keepalive_timeout 5;
|
||||||
|
@ -71,6 +72,7 @@ http {
|
||||||
|
|
||||||
proxy_pass http://app_server;
|
proxy_pass http://app_server;
|
||||||
proxy_read_timeout 2000;
|
proxy_read_timeout 2000;
|
||||||
|
proxy_temp_path /mnt/nginx/proxy_temp 1 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -123,6 +123,7 @@ var isProd = document.location.hostname === 'quay.io';
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- begin olark code -->
|
<!-- begin olark code -->
|
||||||
|
{% if request.host == 'quay.io' %}
|
||||||
<script data-cfasync="false" type='text/javascript'>/*<![CDATA[*/window.olark||(function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){
|
<script data-cfasync="false" type='text/javascript'>/*<![CDATA[*/window.olark||(function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){
|
||||||
f[z]=function(){
|
f[z]=function(){
|
||||||
(a.s=a.s||[]).push(arguments)};var a=f[z]._={
|
(a.s=a.s||[]).push(arguments)};var a=f[z]._={
|
||||||
|
@ -141,6 +142,7 @@ var isProd = document.location.hostname === 'quay.io';
|
||||||
loader: "static.olark.com/jsclient/loader0.js",name:"olark",methods:["configure","extend","declare","identify"]});
|
loader: "static.olark.com/jsclient/loader0.js",name:"olark",methods:["configure","extend","declare","identify"]});
|
||||||
/* custom configuration goes here (www.olark.com/documentation) */
|
/* custom configuration goes here (www.olark.com/documentation) */
|
||||||
olark.identify('1189-336-10-9918');/*]]>*/</script><noscript><a href="https://www.olark.com/site/1189-336-10-9918/contact" title="Contact us" target="_blank">Questions? Feedback?</a> powered by <a href="http://www.olark.com?welcome" title="Olark live chat software">Olark live chat software</a></noscript>
|
olark.identify('1189-336-10-9918');/*]]>*/</script><noscript><a href="https://www.olark.com/site/1189-336-10-9918/contact" title="Contact us" target="_blank">Questions? Feedback?</a> powered by <a href="http://www.olark.com?welcome" title="Olark live chat software">Olark live chat software</a></noscript>
|
||||||
|
{% endif %}
|
||||||
<!-- end olark code -->
|
<!-- end olark code -->
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
Reference in a new issue