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

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/' % name)
#sudo('chown -R www-data .')
sudo('mkdir -p media/uploads')
sudo('env/bin/pip install -r requirements.txt')
sudo('env/bin/python collectstatic --noinput')
if sudo('test -f %s' % os.path.join(directory, 'db.sqlite3').succeeded:
sudo('env/bin/python collectstatic --noinput --no-initial-data')
sudo('env/bin/python collectstatic --noinput')
sudo('env/bin/python 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