Commit 0e319b08 authored by Christophe Siraut's avatar Christophe Siraut

Change owner. Do not apply initial data when db exists.

parent 60a080fa
......@@ -32,11 +32,14 @@ def deploy_remote():
with cd(directory):
sudo('git pull')
sudo('touch %s/wsgi.py' % name)
#sudo('chown -R www-data .')
sudo('mkdir -p media/uploads')
sudo('env/bin/pip install -r requirements.txt')
sudo('env/bin/python manage.py collectstatic --noinput')
if sudo('test -f %s' % os.path.join(directory, 'db.sqlite3').succeeded:
sudo('env/bin/python manage.py collectstatic --noinput --no-initial-data')
else:
sudo('env/bin/python manage.py collectstatic --noinput')
sudo('env/bin/python manage.py syncdb --noinput')
sudo('export gid=$(stat -c %g .); chown -R www-data:$gid .')
def deploy_local():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment