Improve support for installing backup env as 'rattail' user
This commit is contained in:
parent
7bf892d1c6
commit
775b0eed29
|
@ -79,12 +79,13 @@ def deploy_backup_app(deploy, envname, mkvirtualenv=True, user='rattail',
|
||||||
|
|
||||||
# virtualenv
|
# virtualenv
|
||||||
if mkvirtualenv:
|
if mkvirtualenv:
|
||||||
python.mkvirtualenv(envname, python=python_exe, upgrade_setuptools=False)
|
python.mkvirtualenv(envname, python=python_exe, upgrade_setuptools=False,
|
||||||
|
runas_user=user)
|
||||||
envpath = '/srv/envs/{}'.format(envname)
|
envpath = '/srv/envs/{}'.format(envname)
|
||||||
sudo('chown -R {}: {}'.format(user, envpath))
|
sudo('chown -R {}: {}'.format(user, envpath))
|
||||||
with cd(envpath):
|
with cd(envpath):
|
||||||
mkdir('src', owner=user)
|
mkdir('src', owner=user)
|
||||||
sudo('bin/pip install --upgrade pip', user=user)
|
sudo('bin/pip install --upgrade pip setuptools wheel', user=user)
|
||||||
|
|
||||||
# rattail
|
# rattail
|
||||||
if not exists('src/rattail'):
|
if not exists('src/rattail'):
|
||||||
|
|
Loading…
Reference in a new issue