fnp
/
fnpdjango.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5ef0c24
)
Deployment fixes.
author
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Fri, 29 Mar 2013 12:42:21 +0000
(13:42 +0100)
committer
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Fri, 29 Mar 2013 12:42:35 +0000
(13:42 +0100)
fnpdjango/deploy/__init__.py
patch
|
blob
|
history
fnpdjango/deploy/templates/gunicorn.template
patch
|
blob
|
history
fnpdjango/deploy/templates/localsettings.py.template
patch
|
blob
|
history
fnpdjango/deploy/templates/nginx.template
patch
|
blob
|
history
diff --git
a/fnpdjango/deploy/__init__.py
b/fnpdjango/deploy/__init__.py
index
e5cf30b
..
41089bf
100644
(file)
--- a/
fnpdjango/deploy/__init__.py
+++ b/
fnpdjango/deploy/__init__.py
@@
-12,8
+12,8
@@
Then set up some env properties:
services: list of tasks to run after deployment
"""
services: list of tasks to run after deployment
"""
-from fabric.api import *
from os.path import abspath, dirname, exists, join
from os.path import abspath, dirname, exists, join
+from fabric.api import *
from fabric.contrib import files
from fabric.tasks import Task, execute
from fabric.contrib import files
from fabric.tasks import Task, execute
@@
-31,7
+31,7
@@
def setup():
run('mkdir -p %(app_path)s' % env, pty=True)
run('%(virtualenv)s %(app_path)s/ve' % env, pty=True)
run('mkdir -p %(app_path)s' % env, pty=True)
run('%(virtualenv)s %(app_path)s/ve' % env, pty=True)
- run('mkdir -p %(app_path)s/releases %(app_path)s/packages' % env, pty=True)
+ run('mkdir -p %(app_path)s/releases %(app_path)s/packages
%(app_path)s/log
' % env, pty=True)
run('cd %(app_path)s/releases; ln -sfT . current; ln -sfT . previous' % env, pty=True)
upload_samples()
print "Fill out db details in localsettings.py and run deploy."
run('cd %(app_path)s/releases; ln -sfT . current; ln -sfT . previous' % env, pty=True)
upload_samples()
print "Fill out db details in localsettings.py and run deploy."
@@
-199,7
+199,7
@@
def symlink_current_release():
print '>>> symlink current release'
require('release', provided_by=[deploy])
require('app_path')
print '>>> symlink current release'
require('release', provided_by=[deploy])
require('app_path')
- with cd(env.path):
+ with cd(env.
app_
path):
run('rm releases/previous; mv releases/current releases/previous')
run('ln -s %(release)s releases/current' % env)
run('rm releases/previous; mv releases/current releases/previous')
run('ln -s %(release)s releases/current' % env)
diff --git
a/fnpdjango/deploy/templates/gunicorn.template
b/fnpdjango/deploy/templates/gunicorn.template
index
f79aa7e
..
5cf60f4
100644
(file)
--- a/
fnpdjango/deploy/templates/gunicorn.template
+++ b/
fnpdjango/deploy/templates/gunicorn.template
@@
-10,5
+10,6
@@
CONFIG = {
'--timeout=180',
'wsgi:application',
'--access-logfile=%(app_path)s/log/gunicorn.log',
'--timeout=180',
'wsgi:application',
'--access-logfile=%(app_path)s/log/gunicorn.log',
+ '--error-logfile=%(app_path)s/log/gunicorn-error.log'.
),
}
),
}
diff --git
a/fnpdjango/deploy/templates/localsettings.py.template
b/fnpdjango/deploy/templates/localsettings.py.template
index
9a3d04d
..
5f60b61
100644
(file)
--- a/
fnpdjango/deploy/templates/localsettings.py.template
+++ b/
fnpdjango/deploy/templates/localsettings.py.template
@@
-18,7
+18,7
@@
DATABASES = {
SECRET_KEY = '%(secret_key)s'
ALLOWED_HOSTS = (
SECRET_KEY = '%(secret_key)s'
ALLOWED_HOSTS = (
- '%(project_name).nowoczesnapolska.org.pl',
+ '%(project_name)
s
.nowoczesnapolska.org.pl',
)
PIWIK_URL = 'http://piwik.nowoczesnapolska.org.pl/'
)
PIWIK_URL = 'http://piwik.nowoczesnapolska.org.pl/'
diff --git
a/fnpdjango/deploy/templates/nginx.template
b/fnpdjango/deploy/templates/nginx.template
index
810c73c
..
f3a20b9
100644
(file)
--- a/
fnpdjango/deploy/templates/nginx.template
+++ b/
fnpdjango/deploy/templates/nginx.template
@@
-5,7
+5,7
@@
server {
access_log %(app_path)s/log/nginx.log;
error_log %(app_path)s/log/nginx-error.log;
access_log %(app_path)s/log/nginx.log;
error_log %(app_path)s/log/nginx-error.log;
- root %(path)s;
+ root %(
app_
path)s;
location /media/ {
}
location /static/ {
location /media/ {
}
location /static/ {