Combine the registry and index processes.

This commit is contained in:
yackob03 2013-09-30 14:39:10 -04:00
parent 4d6c5b4315
commit abdf731f7a
4 changed files with 5 additions and 19 deletions

View file

@ -14,4 +14,4 @@ class MailConfig(object):
class ProductionConfig(FlaskConfig, MailConfig):
pass
REGISTRY_SERVER = 'localhost:5000'

View file

@ -19,15 +19,12 @@ from auth.permissions import (ModifyRepositoryPermission,
logger = logging.getLogger(__name__)
REGISTRY_SERVER = 'localhost:5003'
def generate_headers(f):
@wraps(f)
def wrapper(namespace, repository, *args, **kwargs):
response = f(namespace, repository, *args, **kwargs)
response.headers['X-Docker-Endpoints'] = REGISTRY_SERVER
response.headers['X-Docker-Endpoints'] = app.config['REGISTRY_SERVER']
has_token_request = request.headers.get('X-Docker-Token', '')

View file

@ -1,13 +0,0 @@
import logging
from app import app
import endpoints.registry
import endpoints.tags
if __name__ == '__main__':
FORMAT = '%(asctime)-15s - %(levelname)s - %(pathname)s - ' + \
'%(funcName)s - %(message)s'
logging.basicConfig(format=FORMAT, level=logging.DEBUG)
app.run(port=5000, debug=True)

View file

@ -5,10 +5,12 @@ from app import app
import endpoints.index
import endpoints.api
import endpoints.web
import endpoints.tags
import endpoints.registry
if __name__ == '__main__':
FORMAT = '%(asctime)-15s - %(levelname)s - %(pathname)s - ' + \
'%(funcName)s - %(message)s'
logging.basicConfig(format=FORMAT, level=logging.DEBUG)
app.run(port=5002, debug=True)
app.run(port=5001, debug=True)