From a13a2c21cc0d3f751429f5ffd55da3449532a766 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Tue, 3 Jan 2017 20:26:32 +0200 Subject: [PATCH 01/19] pip will now update to latest version of pip when doing a major install Changes to be committed: modified: modules/pip.py --- modules/pip.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/pip.py b/modules/pip.py index 34789d1..7ec21df 100644 --- a/modules/pip.py +++ b/modules/pip.py @@ -65,6 +65,8 @@ def setup(): format='\n%(levelname)s: deploy.pip %(message)s', level=logging.DEBUG) + pip_update_latest = "pip install --upgrade pip" + pipinstall_cmd = "pip install -r {requirements}".format( requirements=configuration.virtualenv.requirements.filepath) @@ -73,6 +75,7 @@ def setup(): pipinstall_cmd) else: with virtualenv(): + run(pip_update_latest) run(pipinstall_cmd) From 7a1205786fd0dc6fc7bdcf302990588440a11f16 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Wed, 4 Jan 2017 03:23:01 +0200 Subject: [PATCH 02/19] pip will upgrade to the latest version Changes to be committed: modified: modules/deploy.py modified: modules/pip.py --- modules/deploy.py | 2 ++ modules/pip.py | 26 +++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/modules/deploy.py b/modules/deploy.py index ec1515c..609c45b 100644 --- a/modules/deploy.py +++ b/modules/deploy.py @@ -9,6 +9,7 @@ from utils import print_console from pip import setup_virtualenv from pip import setup as pip_requirements +from pip import upgrade as pip_upgrade import os @@ -79,6 +80,7 @@ def bootstrap(): setup_virtualenv() + pip_upgrade() # upgrade pip to latest version in the virtualenv pip_requirements() # diff --git a/modules/pip.py b/modules/pip.py index 7ec21df..e4b8f69 100644 --- a/modules/pip.py +++ b/modules/pip.py @@ -53,6 +53,29 @@ def setup_virtualenv(): run(mkvirtualenv_cmd) +@task +def upgrade(): + """ + upgrade pip to latest version + """ + + # configuration = env.config + + if env.debug: + logging.basicConfig( + format='\n%(levelname)s: deploy.pip %(message)s', + level=logging.DEBUG) + + pipinstall_cmd = "pip install --upgrade pip" + + if env.debug: + logging.debug("with virtualenv(): run(\"\n\t%s\n\t\")" % + pipinstall_cmd) + else: + with virtualenv(): + run(pipinstall_cmd) + + @task def setup(): """ @@ -65,8 +88,6 @@ def setup(): format='\n%(levelname)s: deploy.pip %(message)s', level=logging.DEBUG) - pip_update_latest = "pip install --upgrade pip" - pipinstall_cmd = "pip install -r {requirements}".format( requirements=configuration.virtualenv.requirements.filepath) @@ -75,7 +96,6 @@ def setup(): pipinstall_cmd) else: with virtualenv(): - run(pip_update_latest) run(pipinstall_cmd) From cd112af3a463e05d5cf983f09a8e92e9bd9965c5 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Tue, 10 Jan 2017 05:22:03 +0200 Subject: [PATCH 03/19] made changes to how pip gets deployed Changes to be committed: modified: modules/deploy.py modified: modules/pip.py --- modules/deploy.py | 7 ++----- modules/pip.py | 9 +++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/modules/deploy.py b/modules/deploy.py index 609c45b..ffa72cc 100644 --- a/modules/deploy.py +++ b/modules/deploy.py @@ -8,8 +8,7 @@ from utils import virtualenv_source, booleanize, loggify from utils import print_console from pip import setup_virtualenv -from pip import setup as pip_requirements -from pip import upgrade as pip_upgrade +from pip import bootstrap_pip import os @@ -79,9 +78,7 @@ def bootstrap(): setup_rootpath() setup_virtualenv() - - pip_upgrade() # upgrade pip to latest version in the virtualenv - pip_requirements() + bootstrap_pip() # # link virtualenv to rootpath/private/virtualenv diff --git a/modules/pip.py b/modules/pip.py index e4b8f69..60e4b38 100644 --- a/modules/pip.py +++ b/modules/pip.py @@ -53,6 +53,15 @@ def setup_virtualenv(): run(mkvirtualenv_cmd) +@task +def bootstrap_pip(): + """ + bootstraps pip + """ + upgrade() + setup() + + @task def upgrade(): """ From f1aa2cfcd07d88dba5ff2ab9eb88b328ac1ab811 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Tue, 10 Jan 2017 05:22:31 +0200 Subject: [PATCH 04/19] modified the way virtualenv_name gets stored for dev vs prod and stage Changes to be committed: modified: bin/deploy_meta.py --- bin/deploy_meta.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/deploy_meta.py b/bin/deploy_meta.py index 4f8451e..01a42b1 100644 --- a/bin/deploy_meta.py +++ b/bin/deploy_meta.py @@ -295,18 +295,27 @@ class DeployMeta(QtGui.QMainWindow): projectname=dquery.get('project.name'), branchext=dquery.get('project.extension')) + virtualenv_name = "{projectname}_{branchext}".format( + projectname=dquery.get('project.name'), + branchext=dquery.get('project.extension')) + nested_path( self.config_data, 'database.name', database_name) nested_path( - self.config_data, 'virtualenv.name', dquery.get('project.name')) + self.config_data, 'virtualenv.name', virtualenv_name) if self.currentbranch == 'development': projectpath = "{projectname}.prj".format( projectname=dquery.get('project.name')) + nested_path( self.config_data, 'project.paths.home', projectpath) + nested_path( + self.config_data, 'virtualenv.name', + dquery.get('project.name')) + def add_widgetrow(self, key, grid): row = grid.rowCount() From 06cc8d5174348f97207fdc710c09426a171b7f5a Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Tue, 10 Jan 2017 05:35:59 +0200 Subject: [PATCH 05/19] updated layout Changes to be committed: modified: share/templates/meta/layout.yml --- share/templates/meta/layout.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/templates/meta/layout.yml b/share/templates/meta/layout.yml index a623210..49b5379 100644 --- a/share/templates/meta/layout.yml +++ b/share/templates/meta/layout.yml @@ -26,7 +26,7 @@ paths: extras: code: "extras/scripts/code" - fixtures: "extras/data/fixtures" + fixtures: "var/fixtures" templates: conf: "usr/etc" From 8f4c4dbc62df08bda736891c436e40e12d0a9df2 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Thu, 9 Feb 2017 05:03:20 +0200 Subject: [PATCH 06/19] now creates the project during deploy.bootstrap Changes to be committed: modified: modules/deploy.py --- modules/deploy.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/deploy.py b/modules/deploy.py index ffa72cc..5acd042 100644 --- a/modules/deploy.py +++ b/modules/deploy.py @@ -80,6 +80,10 @@ def bootstrap(): setup_virtualenv() bootstrap_pip() + # create the django project + from django import create_project + create_project() + # # link virtualenv to rootpath/private/virtualenv From 10032bfa2fdf6a26a69d0e5d1363e808162b2b2a Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Thu, 9 Feb 2017 05:03:45 +0200 Subject: [PATCH 07/19] when osx is updated, xcode needs to be updated or pip installs will fail Changes to be committed: new file: share/templates/readmes/psycopg2_problem.md --- share/templates/readmes/psycopg2_problem.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 share/templates/readmes/psycopg2_problem.md diff --git a/share/templates/readmes/psycopg2_problem.md b/share/templates/readmes/psycopg2_problem.md new file mode 100644 index 0000000..8003250 --- /dev/null +++ b/share/templates/readmes/psycopg2_problem.md @@ -0,0 +1 @@ + xcode-select --install From 24ee8487d6fddbc18de8c9f6f5b68b35f18046d3 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Tue, 21 Mar 2017 14:33:10 +0200 Subject: [PATCH 08/19] updated the amazon web server info, and added a readme for SASS use Changes to be committed: modified: share/templates/readmes/aws.md new file: share/templates/readmes/sass.md --- share/templates/readmes/aws.md | 4 ++-- share/templates/readmes/sass.md | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 share/templates/readmes/sass.md diff --git a/share/templates/readmes/aws.md b/share/templates/readmes/aws.md index 6f7b15b..64582ea 100644 --- a/share/templates/readmes/aws.md +++ b/share/templates/readmes/aws.md @@ -264,8 +264,8 @@ add the following: sudo pip install virtualenv sudo pip install virtualenvwrapper - cat "WORKON_HOME=~/.virtualenvs" >> .bashrc - cat ". /usr/local/bin/virtualenvwrapper.sh" >> .bashrc + echo "WORKON_HOME=~/.virtualenvs" >> .bashrc + echo ". /usr/local/bin/virtualenvwrapper.sh" >> .bashrc ### install nginx diff --git a/share/templates/readmes/sass.md b/share/templates/readmes/sass.md new file mode 100644 index 0000000..8841319 --- /dev/null +++ b/share/templates/readmes/sass.md @@ -0,0 +1,20 @@ +##Sass + +### How to set up sass watch with multiple directories + +```` +sass -I share/media/projectwide_sass_files + --watch code/apps/sassdir:code/apps/cssdir +```` + + +### How to get vim to work with a sass file include + +```` +let g:syntastic_sass_sass_args=" + -I /Full/share/media/projectwide_sass_files" +```` + +[fixing syntastic check args](http://stackoverflow.com/questions/29041876/fixing-syntasticcheck-bootstrap-error-vim-syntastic-plugin) + +[syntastic manual](https://github.com/vim-syntastic/syntastic/blob/master/doc/syntastic.txt) \ No newline at end of file From 7b7ad925df9f9ff69efda887a11e7e7665f8c1a2 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Tue, 21 Mar 2017 14:38:16 +0200 Subject: [PATCH 09/19] Your branch is up-to-date with 'origin/master'. Changes to be committed: new file: blah --- blah | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 blah diff --git a/blah b/blah new file mode 100644 index 0000000..e69de29 From 0fc7f2b44ab27c30816c7e47260d1db8448fad97 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Tue, 21 Mar 2017 14:38:47 +0200 Subject: [PATCH 10/19] Changes to be committed: deleted: blah --- blah | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 blah diff --git a/blah b/blah deleted file mode 100644 index e69de29..0000000 From a55bbe591c17dd2a8d15b66cab84b71a61423700 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Mon, 12 Jun 2017 17:36:22 +0300 Subject: [PATCH 11/19] nginx on development now uses sudo Changes to be committed: modified: share/templates/meta/development.yml --- share/templates/meta/development.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/templates/meta/development.yml b/share/templates/meta/development.yml index 2eb3962..077788f 100644 --- a/share/templates/meta/development.yml +++ b/share/templates/meta/development.yml @@ -22,7 +22,7 @@ maintenance: nginx: commands: {start: nginx, status: ps waux | grep nginx, stop: nginx -s stop} editor: mvim - execute: local + execute: sudo supervisor: commands: {reload: supervisorctl reload, start: supervisorctl start, status: supervisorctl status, stop: supervisorctl stop, update: supervisorctl update} From 5faa4fd99bb46c8ceb81d65266b0bf6b9bc504b8 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Mon, 12 Jun 2017 17:36:45 +0300 Subject: [PATCH 12/19] added share/ssh to layout Changes to be committed: modified: share/templates/meta/layout.yml --- share/templates/meta/layout.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/share/templates/meta/layout.yml b/share/templates/meta/layout.yml index 49b5379..6655f8f 100644 --- a/share/templates/meta/layout.yml +++ b/share/templates/meta/layout.yml @@ -27,6 +27,7 @@ paths: extras: code: "extras/scripts/code" fixtures: "var/fixtures" + ssh: "share/ssh" templates: conf: "usr/etc" From 152b5658a92db467f1b1781e7d7a342654f9750f Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Thu, 20 Jul 2017 23:43:33 +0300 Subject: [PATCH 13/19] fix bug in deployment where pip gets updated during initial bootstrap,but then screws up the rest of the deployment including pip install. Break up the deployment into two parts. NOTE: must find a way to have deployment as one part alone Changes to be committed: modified: modules/deploy.py modified: modules/pip.py --- modules/deploy.py | 145 ++++++++++++++++++++++++++++++++++++++++++++++ modules/pip.py | 2 +- 2 files changed, 146 insertions(+), 1 deletion(-) diff --git a/modules/deploy.py b/modules/deploy.py index 5acd042..6b9971b 100644 --- a/modules/deploy.py +++ b/modules/deploy.py @@ -193,6 +193,151 @@ def bootstrap(): db.init() +@task +def bootstrap_part1(): + # import database as db + + # configuration = env.config + + # if env.debug: + # logger = loggify('deploy', 'bootstrap_part1') + + # + # not doing a full sync, because we have to set up the rootpath, + # virtualenv, files, dir structure, etc. This means we aren't + # going to upload gunicorn and supervisor until after we've done + # everything else at the end of the bootstrapping process + + sync(full=False) + + # continue setting up the rootpath and virtualenv + setup_rootpath() + + setup_virtualenv() + + +@task +def bootstrap_part2(): + import database as db + + configuration = env.config + + if env.debug: + logger = loggify('deploy', 'bootstrap') + + # create the django project + from django import create_project + create_project() + + # + # link virtualenv to rootpath/private/virtualenv + + src_virtual = configuration.virtualenv.paths.root + dst_virtual = configuration.paths.server.virtual + + # + # link templates to rootpath/private/templates + + src_templates = configuration.paths.django.templates + dst_templates = configuration.paths.server.django.templates + + # + # link the django code in the project directory to the appropriate location + # in the rootpath directory + + src_code = configuration.paths.django.root + dst_code = configuration.paths.server.django.code + + # + # I corrected the linking code so that it deletes already existing + # links before creating them, otherwise you get really weird errors + # where the a link is recreated within the destination link + + from utils import link_create + + if env.debug: + logger.debug("virtualenv.root : %s" + % configuration.virtualenv.paths.root) + logger.debug("virtualenv.bin : %s\n" % + configuration.virtualenv.paths.bin) + + logger.debug("paths.server\n") + + logger.debug(" - root\t: %s" % configuration.paths.server.root) + + logger.debug(" - media\t: %s" % + configuration.paths.server.media.static) + + logger.debug(" - virtual\t: %s" % configuration.paths.server.virtual) + + logger.debug(" - django.code\t: %s\n" % + configuration.paths.server.django.code) + + logger.debug("django templates : %s" % + configuration.paths.django.templates) + + logger.debug("django root : %s" % + configuration.paths.django.root) + + logger.debug("django settings : %s" % + configuration.paths.django.settings.root) + + logger.debug("django local : %s" % + configuration.paths.django.settings.local) + + logger.debug(link_create(src_virtual, dst_virtual, debug=True)) + logger.debug(link_create(src_templates, dst_templates, debug=True)) + logger.debug(link_create(src_code, dst_code, debug=True)) + + else: + link_create(src_virtual, dst_virtual) + link_create(src_templates, dst_templates) + link_create(src_code, dst_code) + + # + # create and link the scripts that manage the server + # e.g. nginx, supervisor, gunicorn + + from nginx import upload as upload_nginx + from supervisor import upload as upload_supervisor + from django import generate as django_generate + + print_console("creating gunicorn script") + django_generate('gunicorn', True) + django_generate('local', True) + + print_console("creating supervisor script") + upload_supervisor() + + print_console("creating nginx script") + upload_nginx() + + # + # instantiate docker containers if any + + import docker + + print_console("check to see if docker containers are used") + + if hasattr(configuration, "docker"): + print_console("generating docker configuration file") + docker.generate() + + print_console("creating and starting docker container") + docker.create() + else: + print_console("no docker containers are being used. pass") + + # + # create and initialize the database + + print_console("in db.generate") + db.generate() + + print_console("in db.init") + db.init() + + @task def sync(full=True, extras=False): diff --git a/modules/pip.py b/modules/pip.py index 60e4b38..88b5ba1 100644 --- a/modules/pip.py +++ b/modules/pip.py @@ -58,7 +58,7 @@ def bootstrap_pip(): """ bootstraps pip """ - upgrade() + # upgrade() setup() From 6c757d0343cf5228e236532dacc8258d170583c1 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Thu, 3 Aug 2017 07:50:08 +0300 Subject: [PATCH 14/19] add regex.md file for useful regex commands Changes to be committed: new file: share/templates/readmes/regex.md --- share/templates/readmes/regex.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 share/templates/readmes/regex.md diff --git a/share/templates/readmes/regex.md b/share/templates/readmes/regex.md new file mode 100644 index 0000000..379a19d --- /dev/null +++ b/share/templates/readmes/regex.md @@ -0,0 +1,9 @@ +# useful regex commands + +## convert href to static + +`.s/href="\([^"]\+\)"/href="{% static '\1' %}"` + +use when **href="/some/link/file.css"** if the + +quotes are single quotes, then convert them to double \ No newline at end of file From 6277075e18b1c40c11f3ac95a2952b9bd2f04f90 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Tue, 8 Aug 2017 17:26:35 +0300 Subject: [PATCH 15/19] added some options for nginx Changes to be committed: modified: modules/initialize.py modified: modules/nginx.py new file: share/templates/readmes/paramiko.md --- modules/initialize.py | 3 +++ modules/nginx.py | 1 + share/templates/readmes/paramiko.md | 1 + 3 files changed, 5 insertions(+) create mode 100644 share/templates/readmes/paramiko.md diff --git a/modules/initialize.py b/modules/initialize.py index 2740a87..080af04 100644 --- a/modules/initialize.py +++ b/modules/initialize.py @@ -348,6 +348,9 @@ def get_config(branchname): dataobject.server.addbranch('nginx') dataobject.server.nginx.port = config['nginx']['port'] + dataobject.server.nginx.socket = config['nginx']['socket'] + + print "DEBUG -- socket: %s" % dataobject.server.nginx.socket if config['project']['host'] == "localhost": dataobject.server.nginx.host = "{projectname}.{ext}".format( diff --git a/modules/nginx.py b/modules/nginx.py index c62f341..f90fc8f 100644 --- a/modules/nginx.py +++ b/modules/nginx.py @@ -98,6 +98,7 @@ def upload(): context['error_log'] = configuration.logging.nginx.error context['port'] = configuration.server.nginx.port + context['socket'] = configuration.server.nginx.socket context['django_host'] = configuration.server.django.host context['django_port'] = configuration.server.django.port diff --git a/share/templates/readmes/paramiko.md b/share/templates/readmes/paramiko.md new file mode 100644 index 0000000..919e08f --- /dev/null +++ b/share/templates/readmes/paramiko.md @@ -0,0 +1 @@ +env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography From 2c19ba589b039988d7b60ba40b02df2f60e7a5e3 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Mon, 28 Aug 2017 23:53:26 +0300 Subject: [PATCH 16/19] updated help message modified: modules/django.py --- modules/django.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/django.py b/modules/django.py index 3a08ebd..deb2969 100644 --- a/modules/django.py +++ b/modules/django.py @@ -369,6 +369,11 @@ def generate_scripts(template_name, make_copy=False): @task def generate(param=None, make_copy=False): + """ + param can be one of settings, local, wsgi + make_copy must be set to True if you want it to actually do anthing + """ + SCRIPT_LIST = ['settings', 'local', 'wsgi'] PARAM_LIST = list(SCRIPT_LIST) PARAM_LIST.append('gunicorn') @@ -384,6 +389,7 @@ def generate(param=None, make_copy=False): print "django:generate make_copy : %s\n" % make_copy print "django:generate script : %s" % param + if env.debug: print "django:generate script : %s" % param print "django:generate make_copy : %s\n" % make_copy @@ -396,7 +402,6 @@ def generate(param=None, make_copy=False): if not param: # this is where script=None, generate all scripts - for scriptkey in SCRIPT_LIST: generate_scripts(scriptkey, make_copy) From 6691cd1af8689038482bf2bb616d7663f8efafbc Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Mon, 28 Aug 2017 23:53:42 +0300 Subject: [PATCH 17/19] changed ALLOWED_SITES to include whatever we call the host site Changes to be committed: modified: share/templates/conf/django/files/local.jinja2 --- share/templates/conf/django/files/local.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/templates/conf/django/files/local.jinja2 b/share/templates/conf/django/files/local.jinja2 index 980b10f..bc06c78 100644 --- a/share/templates/conf/django/files/local.jinja2 +++ b/share/templates/conf/django/files/local.jinja2 @@ -70,7 +70,7 @@ 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, ] +ALLOWED_HOSTS = [configuration.project.extendedname, configuration.project.host] # ----------------------------------------- # Debug logging to the console From 200924b6d8ec143fc97be76d2235d2accec2a3d3 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Tue, 29 Aug 2017 00:07:47 +0300 Subject: [PATCH 18/19] add check to see if the 'socket' or 'port' options have been set in the configuration file before trying to load it in initilaize.py --- modules/initialize.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/initialize.py b/modules/initialize.py index 080af04..38ba3f8 100644 --- a/modules/initialize.py +++ b/modules/initialize.py @@ -347,10 +347,12 @@ def get_config(branchname): dataobject.server.addbranch('nginx') - dataobject.server.nginx.port = config['nginx']['port'] - dataobject.server.nginx.socket = config['nginx']['socket'] + if 'port' in config['nginx']: + dataobject.server.nginx.port = config['nginx']['port'] - print "DEBUG -- socket: %s" % dataobject.server.nginx.socket + if 'socket' in config['nginx']: + dataobject.server.nginx.socket = config['nginx']['socket'] + print "DEBUG -- socket: %s" % dataobject.server.nginx.socket if config['project']['host'] == "localhost": dataobject.server.nginx.host = "{projectname}.{ext}".format( From 9c8f83cc38d53406ba6b479f4a06ed545580207b Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Tue, 29 Aug 2017 02:32:23 +0300 Subject: [PATCH 19/19] go back to original settings for config/nginx/static modified: modules/initialize.py --- modules/initialize.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/initialize.py b/modules/initialize.py index 38ba3f8..edfe21f 100644 --- a/modules/initialize.py +++ b/modules/initialize.py @@ -347,12 +347,10 @@ def get_config(branchname): dataobject.server.addbranch('nginx') - if 'port' in config['nginx']: - dataobject.server.nginx.port = config['nginx']['port'] + dataobject.server.nginx.port = config['nginx']['port'] - if 'socket' in config['nginx']: - dataobject.server.nginx.socket = config['nginx']['socket'] - print "DEBUG -- socket: %s" % dataobject.server.nginx.socket + dataobject.server.nginx.socket = config['nginx']['socket'] + print "DEBUG -- socket: %s" % dataobject.server.nginx.socket if config['project']['host'] == "localhost": dataobject.server.nginx.host = "{projectname}.{ext}".format(