fabric/templates/conf/gunicorn/files/local.jinja2

137 lines
4.1 KiB
Text
Raw Normal View History

new file: api.py new file: api.pyc new file: conf/fabric.yml new file: fabfile.py new file: fabfile.pyc new file: modules/__init__.py new file: modules/__init__.pyc new file: modules/conf_setup.py new file: modules/conf_setup.pyc new file: modules/configuration_setup.py new file: modules/database.py new file: modules/database.pyc new file: modules/deploy.py new file: modules/deploy.pyc new file: modules/django.py new file: modules/django.pyc new file: modules/docker.py new file: modules/docker.pyc new file: modules/initialize.py new file: modules/initialize.pyc new file: modules/maintenance.py new file: modules/maintenance.pyc new file: modules/nginx.py new file: modules/nginx.pyc new file: modules/pip.py new file: modules/pip.pyc new file: modules/setup.pyc new file: modules/supervisor.py new file: modules/supervisor.pyc new file: modules/testing/__init__.py new file: modules/testing/__init__.pyc new file: modules/testing/configuration_setup.py new file: modules/testing/maintenance.pyc new file: modules/utils.py new file: modules/utils.pyc new file: templates/conf/database/files/db.drop_all.sql.jinja2 new file: templates/conf/database/files/db.drop_db.sql.jinja2 new file: templates/conf/database/files/db.init.sql.jinja2 new file: templates/conf/database/files/db.re_init.sql.jinja2 new file: templates/conf/django/files/gunicorn.jinja2 new file: templates/conf/django/files/gunicorn.unixsocket.jinja2 new file: templates/conf/django/files/local.jinja2 new file: templates/conf/django/files/settings.jinja2 new file: templates/conf/django/files/settings18.jinja2 new file: templates/conf/django/files/wsgi.jinja2 new file: templates/conf/django/files/wsgi.py new file: templates/conf/docker/files/database.jinja2 new file: templates/conf/gunicorn/files/gunicorn.jinja2 new file: templates/conf/gunicorn/files/gunicorn.unixsocket.jinja2 new file: templates/conf/gunicorn/files/local.jinja2 new file: templates/conf/gunicorn/files/settings.jinja2 new file: templates/conf/gunicorn/files/settings18.jinja2 new file: templates/conf/gunicorn/files/wsgi.jinja2 new file: templates/conf/gunicorn/files/wsgi.py new file: templates/conf/nginx/files/default.conf.jinja2 new file: templates/conf/nginx/files/unixsocket.jinja2 new file: templates/conf/supervisor/files/conf_old new file: templates/conf/supervisor/files/supervisor.jinja2 new file: templates/meta/development.yml new file: templates/meta/layout.yml new file: templates/meta/staging.yml new file: templates/readmes/aws.md new file: templates/readmes/gandi.md new file: templates/readmes/reset_migrations.md new file: templates/readmes/setup_gandi.md new file: templates/readmes/translations.md new file: templates/readmes/update_images.md
2016-09-06 14:43:49 +03:00
LOCAL_SETTINGS = True # avoid recursive imports
BRANCH = '{{ project_branch }}'
from {{ project_name }}.settings import *
import initialize
import logging
LOCAL_LOGGING_PREFIX = "%s %%(message)s" % BRANCH
logging.basicConfig(format=LOCAL_LOGGING_PREFIX, level=logging.DEBUG)
configuration = initialize.environment(BRANCH)
new file: api.py new file: api.pyc new file: conf/fabric.yml new file: fabfile.py new file: fabfile.pyc new file: modules/__init__.py new file: modules/__init__.pyc new file: modules/conf_setup.py new file: modules/conf_setup.pyc new file: modules/configuration_setup.py new file: modules/database.py new file: modules/database.pyc new file: modules/deploy.py new file: modules/deploy.pyc new file: modules/django.py new file: modules/django.pyc new file: modules/docker.py new file: modules/docker.pyc new file: modules/initialize.py new file: modules/initialize.pyc new file: modules/maintenance.py new file: modules/maintenance.pyc new file: modules/nginx.py new file: modules/nginx.pyc new file: modules/pip.py new file: modules/pip.pyc new file: modules/setup.pyc new file: modules/supervisor.py new file: modules/supervisor.pyc new file: modules/testing/__init__.py new file: modules/testing/__init__.pyc new file: modules/testing/configuration_setup.py new file: modules/testing/maintenance.pyc new file: modules/utils.py new file: modules/utils.pyc new file: templates/conf/database/files/db.drop_all.sql.jinja2 new file: templates/conf/database/files/db.drop_db.sql.jinja2 new file: templates/conf/database/files/db.init.sql.jinja2 new file: templates/conf/database/files/db.re_init.sql.jinja2 new file: templates/conf/django/files/gunicorn.jinja2 new file: templates/conf/django/files/gunicorn.unixsocket.jinja2 new file: templates/conf/django/files/local.jinja2 new file: templates/conf/django/files/settings.jinja2 new file: templates/conf/django/files/settings18.jinja2 new file: templates/conf/django/files/wsgi.jinja2 new file: templates/conf/django/files/wsgi.py new file: templates/conf/docker/files/database.jinja2 new file: templates/conf/gunicorn/files/gunicorn.jinja2 new file: templates/conf/gunicorn/files/gunicorn.unixsocket.jinja2 new file: templates/conf/gunicorn/files/local.jinja2 new file: templates/conf/gunicorn/files/settings.jinja2 new file: templates/conf/gunicorn/files/settings18.jinja2 new file: templates/conf/gunicorn/files/wsgi.jinja2 new file: templates/conf/gunicorn/files/wsgi.py new file: templates/conf/nginx/files/default.conf.jinja2 new file: templates/conf/nginx/files/unixsocket.jinja2 new file: templates/conf/supervisor/files/conf_old new file: templates/conf/supervisor/files/supervisor.jinja2 new file: templates/meta/development.yml new file: templates/meta/layout.yml new file: templates/meta/staging.yml new file: templates/readmes/aws.md new file: templates/readmes/gandi.md new file: templates/readmes/reset_migrations.md new file: templates/readmes/setup_gandi.md new file: templates/readmes/translations.md new file: templates/readmes/update_images.md
2016-09-06 14:43:49 +03:00
SITE_ID = 1
TEMPLATES[0]['DIRS'].append(configuration.paths.django.templates)
#
# NOTE: a lot of the code in these local settings files are automated and you
# might be inclined to take them out and move them into the main settings.py
# file. That would be a mistake. These automatic files AT THE VERY LEAST have
# one variable, and that is WHICH BRANCH CONFIGURATION FILE ARE WE LOOKING AT.
# Once I set that file, THEN all the rest of the information can be automated.
# So all these automated info needs to be here.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.{db_backend}'.format(
db_backend=configuration.server.database.backend),
'NAME': '{db_name}'.format(db_name=configuration.server.database.name),
'USER': '{db_user}'.format(db_user=configuration.server.database.user),
'PASSWORD': '{db_pass}'.format(
db_pass=configuration.server.database.password),
'HOST': '{db_host}'.format(db_host=configuration.server.database.host),
'PORT': '{db_port}'.format(db_port=configuration.server.database.port),
}
}
#
# directory from which we serve static files
#
# NOTE: both STATIC and MEDIA roots are getting their values from the
# initialization files that are set up above. Also, MEDIA_ROOT is being set
# to something called "paths.server.media.dynamic" - the names are different,
# but it means the same thing.
#
# MEDIA_ROOT is the dynamic media information that the web server, user or
# admin # will be adding and taking out. It's why I call it "dynamic"
STATIC_ROOT = configuration.paths.server.media.static
MEDIA_ROOT = configuration.paths.server.media.dynamic
# directories from which we search for static files to place in STATIC_ROOT
# these static files are located within the project root as opposed to the
# server root location
STATICFILES_DIRS = (
os.path.join(configuration.paths.project.root, "media"),
)
# debug and debug toolbar settings
DEBUG = True
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
new file: api.py new file: api.pyc new file: conf/fabric.yml new file: fabfile.py new file: fabfile.pyc new file: modules/__init__.py new file: modules/__init__.pyc new file: modules/conf_setup.py new file: modules/conf_setup.pyc new file: modules/configuration_setup.py new file: modules/database.py new file: modules/database.pyc new file: modules/deploy.py new file: modules/deploy.pyc new file: modules/django.py new file: modules/django.pyc new file: modules/docker.py new file: modules/docker.pyc new file: modules/initialize.py new file: modules/initialize.pyc new file: modules/maintenance.py new file: modules/maintenance.pyc new file: modules/nginx.py new file: modules/nginx.pyc new file: modules/pip.py new file: modules/pip.pyc new file: modules/setup.pyc new file: modules/supervisor.py new file: modules/supervisor.pyc new file: modules/testing/__init__.py new file: modules/testing/__init__.pyc new file: modules/testing/configuration_setup.py new file: modules/testing/maintenance.pyc new file: modules/utils.py new file: modules/utils.pyc new file: templates/conf/database/files/db.drop_all.sql.jinja2 new file: templates/conf/database/files/db.drop_db.sql.jinja2 new file: templates/conf/database/files/db.init.sql.jinja2 new file: templates/conf/database/files/db.re_init.sql.jinja2 new file: templates/conf/django/files/gunicorn.jinja2 new file: templates/conf/django/files/gunicorn.unixsocket.jinja2 new file: templates/conf/django/files/local.jinja2 new file: templates/conf/django/files/settings.jinja2 new file: templates/conf/django/files/settings18.jinja2 new file: templates/conf/django/files/wsgi.jinja2 new file: templates/conf/django/files/wsgi.py new file: templates/conf/docker/files/database.jinja2 new file: templates/conf/gunicorn/files/gunicorn.jinja2 new file: templates/conf/gunicorn/files/gunicorn.unixsocket.jinja2 new file: templates/conf/gunicorn/files/local.jinja2 new file: templates/conf/gunicorn/files/settings.jinja2 new file: templates/conf/gunicorn/files/settings18.jinja2 new file: templates/conf/gunicorn/files/wsgi.jinja2 new file: templates/conf/gunicorn/files/wsgi.py new file: templates/conf/nginx/files/default.conf.jinja2 new file: templates/conf/nginx/files/unixsocket.jinja2 new file: templates/conf/supervisor/files/conf_old new file: templates/conf/supervisor/files/supervisor.jinja2 new file: templates/meta/development.yml new file: templates/meta/layout.yml new file: templates/meta/staging.yml new file: templates/readmes/aws.md new file: templates/readmes/gandi.md new file: templates/readmes/reset_migrations.md new file: templates/readmes/setup_gandi.md new file: templates/readmes/translations.md new file: templates/readmes/update_images.md
2016-09-06 14:43:49 +03:00
USE_DEBUG_TOOLBAR = DEBUG
# allow template debug outputs on {{ project_branch }} environment
INTERNAL_IPS = ['127.0.0.1', '127.0.0.2', '127.0.0.3', ]
ALLOWED_HOSTS = [configuration.project.extendedname, ]
# -----------------------------------------
# Debug logging to the console
# convenience variable naming, otherwise it's too long to deal with
file_debug_handler = configuration.logging.django.handlers.file_debug
LOGGING = {
'version': 1,
'formatters': {
'verbose': {
'format': "%(levelname)s %(asctime)s %(module)s %(process)d"
" %(thread)d %(message)s"
},
'simple': {
'format': '%(levelname)s %(message)s'
},
'code': {
'format': "%(module)s:%(funcName)s - %(message)s"
},
},
'handlers': {
file_debug_handler.name.project: {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': file_debug_handler.path.project,
'formatter': 'code'
},
file_debug_handler.name.server: {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': file_debug_handler.path.server,
'formatter': 'code'
},
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'simple'
},
'null': {
'level': 'DEBUG',
'class': 'logging.NullHandler',
}
},
'loggers': {
'django.debug': {
# use the console for logging
'handlers':
[
'console',
file_debug_handler.name.project,
file_debug_handler.name.server
],
'level': 'DEBUG',
'propagate': True,
},
}
}