# Path: docker_registry/server/env.py
# _DEFAULT = {
#     'REGISTRY_PORT': '5000',
#     'REGISTRY_HOST': '0.0.0.0',
#     'SETTINGS_FLAVOR': 'dev',
#     'GUNICORN_WORKERS': '4',
#     'GUNICORN_GRACEFUL_TIMEOUT': '3600',
#     'GUNICORN_SILENT_TIMEOUT': '3600',
#     'GUNICORN_ACCESS_LOG_FILE': '"-"',
#     'GUNICORN_ERROR_LOG_FILE': '"-"',
#     'GUNICORN_OPTS': '[]',
#     'NEW_RELIC_INI': '',
#     'NEW_RELIC_STAGE': 'dev'
# }
# def source(key, override=''):
# 
# Path: docker_registry/run.py
# DESCRIPTION = """run the docker-registry with gunicorn, honoring the following
# environment variables:
# REGISTRY_HOST: TCP host or ip to bind to; default is 0.0.0.0
# REGISTRY_PORT: TCP port to bind to; default is 5000
# GUNICORN_WORKERS: number of worker processes gunicorn should start
# GUNICORN_GRACEFUL_TIMEOUT: timeout in seconds for graceful worker restart
# GUNICORN_SILENT_TIMEOUT: timeout in seconds for restarting silent workers
# GUNICORN_USER: unix user to downgrade priviledges to
# GUNICORN_GROUP: unix group to downgrade priviledges to
# GUNICORN_ACCESS_LOG_FILE: File to log access to
# GUNICORN_ERROR_LOG_FILE: File to log errors to
# """
# def run_gunicorn():


from .server import env
from .run import app
import logging
        import newrelic.agent
#!/usr/bin/env python
# -*- coding: utf-8 -*-


_new_relic_ini = env.source('NEW_RELIC_INI')
if _new_relic_ini:
    try:
        newrelic.agent.initialize(
            _new_relic_ini,
            env.source('NEW_RELIC_STAGE'))
    except Exception as e:
        raise(Exception('Failed to init new relic agent %s' % e))


if __name__ == '__main__':
    # Bind to PORT if defined, otherwise default to 5000.
    host = env.source('REGISTRY_HOST')
    port = env.source('REGISTRY_PORT')

# Path: docker_registry/server/env.py
# _DEFAULT = {
#     'REGISTRY_PORT': '5000',
#     'REGISTRY_HOST': '0.0.0.0',
#     'SETTINGS_FLAVOR': 'dev',
#     'GUNICORN_WORKERS': '4',
#     'GUNICORN_GRACEFUL_TIMEOUT': '3600',
#     'GUNICORN_SILENT_TIMEOUT': '3600',
#     'GUNICORN_ACCESS_LOG_FILE': '"-"',
#     'GUNICORN_ERROR_LOG_FILE': '"-"',
#     'GUNICORN_OPTS': '[]',
#     'NEW_RELIC_INI': '',
#     'NEW_RELIC_STAGE': 'dev'
# }
# def source(key, override=''):
# 
# Path: docker_registry/run.py
# DESCRIPTION = """run the docker-registry with gunicorn, honoring the following
# environment variables:
# REGISTRY_HOST: TCP host or ip to bind to; default is 0.0.0.0
# REGISTRY_PORT: TCP port to bind to; default is 5000
# GUNICORN_WORKERS: number of worker processes gunicorn should start
# GUNICORN_GRACEFUL_TIMEOUT: timeout in seconds for graceful worker restart
# GUNICORN_SILENT_TIMEOUT: timeout in seconds for restarting silent workers
# GUNICORN_USER: unix user to downgrade priviledges to
# GUNICORN_GROUP: unix group to downgrade priviledges to
# GUNICORN_ACCESS_LOG_FILE: File to log access to
# GUNICORN_ERROR_LOG_FILE: File to log errors to
# """
# def run_gunicorn():


# Path: docker_registry/wsgi.py
from .server import env
from .run import app
import logging
        import newrelic.agent

#!/usr/bin/env python
# -*- coding: utf-8 -*-


_new_relic_ini = env.source('NEW_RELIC_INI')
if _new_relic_ini:
    try:
        newrelic.agent.initialize(
            _new_relic_ini,
            env.source('NEW_RELIC_STAGE'))
    except Exception as e:
        raise(Exception('Failed to init new relic agent %s' % e))


if __name__ == '__main__':
    # Bind to PORT if defined, otherwise default to 5000.
    host = env.source('REGISTRY_HOST')
    port = env.source('REGISTRY_PORT')

    app.debug = True