Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chris
flyers
Commits
0e319b08
Commit
0e319b08
authored
Mar 04, 2014
by
Christophe Siraut
Browse files
Change owner. Do not apply initial data when db exists.
parent
60a080fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
fabfile.py
View file @
0e319b08
...
...
@@ -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
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment