add info for ssl
This commit is contained in:
parent
d4df4bb7e6
commit
a0ac1eefa9
2 changed files with 45 additions and 3 deletions
|
|
@ -120,8 +120,9 @@ def add_template(dataobject, layout, config, section, template_name="conf"):
|
|||
# dataobject.templates.section.tname.src
|
||||
# dataobject.templates.section.tname.dst
|
||||
|
||||
# if env.debug:
|
||||
# logger = loggify('intialize', 'add_template')
|
||||
if env.debug:
|
||||
# logger = loggify('intialize', 'add_template')
|
||||
debug_section = "DEBUG initialize.add_templates[%s]" % section
|
||||
|
||||
if not hasattr(dataobject.templates, section):
|
||||
dataobject.templates.addbranch(section)
|
||||
|
|
@ -142,12 +143,35 @@ def add_template(dataobject, layout, config, section, template_name="conf"):
|
|||
var_section_source = layout['templates'][section][template_name]['source']
|
||||
var_section_output = layout['templates'][section][template_name]['output']
|
||||
|
||||
if env.debug and section == 'nginx':
|
||||
print("%s -- var_section_path: %s" % (debug_section, var_section_path))
|
||||
print("%s -- var_section_source: %s" %
|
||||
(debug_section, var_section_source))
|
||||
|
||||
print("%s -- templates in config: %s" %
|
||||
(debug_section, 'templates' in config))
|
||||
|
||||
print("%s -- nginx in config: %s" %
|
||||
(debug_section, 'nginx' in config))
|
||||
|
||||
if 'nginx' in config:
|
||||
print("%s -- ssl in config[nginx]: %s" %
|
||||
(debug_section, 'ssl' in config['nginx']))
|
||||
print("%s -- port in config[nginx]: %s" %
|
||||
(debug_section, 'port' in config['nginx']))
|
||||
|
||||
if 'templates' in config:
|
||||
print("%s -- templates in config" % debug_section)
|
||||
|
||||
if 'templates' in config and section in config['templates']:
|
||||
_config = config['templates'][section]
|
||||
var_section_path = _config['path']
|
||||
var_section_source = _config[template_name]['source']
|
||||
var_section_output = _config[template_name]['output']
|
||||
|
||||
if env.debug:
|
||||
print("%s -- breakpoint 2" % debug_section)
|
||||
|
||||
# define the local, and dest paths
|
||||
_template.path.local = os.path.join(
|
||||
dataobject.paths.project.local,
|
||||
|
|
@ -163,9 +187,15 @@ def add_template(dataobject, layout, config, section, template_name="conf"):
|
|||
conf_template = getattr(_template, template_name)
|
||||
|
||||
conf_template.src = var_section_source
|
||||
|
||||
conf_template.dst = var_section_output
|
||||
|
||||
if env.debug:
|
||||
print("%s -- template_name: %s" % (debug_section, template_name))
|
||||
print("%s -- conf_template.src: %s" %
|
||||
(debug_section, conf_template.src))
|
||||
print("%s -- conf_template.dst: %s" %
|
||||
(debug_section, conf_template.dst))
|
||||
|
||||
|
||||
def get_config(branchname):
|
||||
|
||||
|
|
@ -363,6 +393,17 @@ def get_config(branchname):
|
|||
dataobject.server.nginx.port = config['nginx']['port']
|
||||
|
||||
dataobject.server.nginx.socket = config['nginx']['socket']
|
||||
|
||||
if 'ssl' in config['nginx']:
|
||||
|
||||
dataobject.server.nginx.addbranch('ssl')
|
||||
|
||||
dataobject.server.nginx.ssl.servername = \
|
||||
config['nginx']['ssl_server_name']
|
||||
|
||||
dataobject.server.nginx.ssl.serverext = \
|
||||
config['nginx']['ssl_server_ext']
|
||||
|
||||
print("DEBUG -- socket: %s" % dataobject.server.nginx.socket)
|
||||
|
||||
if config['project']['host'] == "localhost":
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ def upload():
|
|||
context['django_host'] = configuration.server.django.host
|
||||
context['django_port'] = configuration.server.django.port
|
||||
|
||||
context['project_name'] = configuration.project.name
|
||||
context['extended_name'] = configuration.project.extendedname
|
||||
|
||||
context['virtualenv_sitepackages'] = \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue