Merge branch 'master' of https://bitbucket.org/yackob03/quay
This commit is contained in:
commit
6a2b439863
4 changed files with 17 additions and 9 deletions
|
@ -21,7 +21,7 @@ running:
|
|||
|
||||
```
|
||||
sudo nginx -c `pwd`/nginx.conf
|
||||
STACK=prod gunicorn -D --workers 4 -b unix:/tmp/gunicorn.sock --worker-class eventlet -t 500 application:application
|
||||
STACK=prod gunicorn -D --workers 4 -b unix:/tmp/gunicorn.sock --worker-class eventlet -t 2000 application:application
|
||||
```
|
||||
|
||||
set up the snapshot script:
|
||||
|
|
|
@ -157,10 +157,15 @@ def create_repository(namespace, repository):
|
|||
|
||||
response = make_response('Created', 201)
|
||||
|
||||
extra_params = {
|
||||
'repository': '%s/%s' % (namespace, repository),
|
||||
}
|
||||
|
||||
if get_authenticated_user():
|
||||
mixpanel.track(get_authenticated_user().username, 'push_repo')
|
||||
mixpanel.track(get_authenticated_user().username, 'push_repo',
|
||||
extra_params)
|
||||
else:
|
||||
mixpanel.track(get_validated_token().code, 'push_repo')
|
||||
mixpanel.track(get_validated_token().code, 'push_repo', extra_params)
|
||||
|
||||
return response
|
||||
|
||||
|
@ -220,7 +225,10 @@ def get_repository_images(namespace, repository):
|
|||
if get_authenticated_user():
|
||||
pull_username = get_authenticated_user().username
|
||||
|
||||
mixpanel.track(pull_username, 'pull_repo')
|
||||
extra_params = {
|
||||
'repository': '%s/%s' % (namespace, repository),
|
||||
}
|
||||
mixpanel.track(pull_username, 'pull_repo', extra_params)
|
||||
|
||||
return resp
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ http {
|
|||
|
||||
server {
|
||||
listen 443 default;
|
||||
client_max_body_size 4G;
|
||||
client_max_body_size 8G;
|
||||
server_name _;
|
||||
|
||||
keepalive_timeout 5;
|
||||
|
@ -61,6 +61,7 @@ http {
|
|||
proxy_buffering off;
|
||||
|
||||
proxy_pass http://app_server;
|
||||
proxy_read_timeout 2000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import re
|
||||
import urllib
|
||||
|
||||
INVALID_PASSWORD_MESSAGE = 'Invalid password, password must be at least ' + \
|
||||
'8 characters and contain no whitespace.'
|
||||
|
@ -12,9 +11,9 @@ def validate_email(email_address):
|
|||
|
||||
def validate_username(username):
|
||||
# Minimum length of 2, maximum length of 255, no url unsafe characters
|
||||
return (urllib.quote(username, safe='') == username and
|
||||
len(username) > 1 and
|
||||
len(username) < 256)
|
||||
return (re.search(r'[^a-z0-9_]', username) is None and
|
||||
len(username) >= 4 and
|
||||
len(username) <= 30)
|
||||
|
||||
|
||||
def validate_password(password):
|
||||
|
|
Reference in a new issue