Added python packages install support
Change-Id: I5b6178ed2db510f8f708901d513f1512e5226a36 Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
parent
e83ceadfe4
commit
8ddb3f8ce3
|
@ -60,6 +60,15 @@ function set_laravel_storage_permissions {
|
|||
chmod 0770 vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer
|
||||
}
|
||||
|
||||
function set_python_venv {
|
||||
cd $target_dir/app/Console/Commands/SpammerProcess
|
||||
python3 -m venv env
|
||||
source env/bin/activate
|
||||
pip install -r requirements.txt
|
||||
deactivate;
|
||||
cd $target_dir
|
||||
}
|
||||
|
||||
function site_init {
|
||||
if [ ! $1 ]; then
|
||||
echo "ERROR: site parameter mandatory"
|
||||
|
@ -135,6 +144,8 @@ function site_init {
|
|||
|
||||
set_laravel_storage_permissions
|
||||
|
||||
set_python_venv
|
||||
|
||||
# activate site
|
||||
rm -rf $SITE_ROOT/w
|
||||
ln -s $SITE_ROOT/slot0 $SITE_ROOT/w
|
||||
|
@ -261,6 +272,8 @@ function site_update {
|
|||
|
||||
set_laravel_storage_permissions
|
||||
|
||||
set_python_venv
|
||||
|
||||
# activate site
|
||||
rm -rf $SITE_ROOT/w
|
||||
ln -s $target_dir $SITE_ROOT/w
|
||||
|
|
|
@ -141,6 +141,13 @@ class openstackid (
|
|||
'software-properties-common',
|
||||
'python-software-properties',
|
||||
'supervisor',
|
||||
'python3-pip',
|
||||
'python3-dev',
|
||||
'libssl-dev',
|
||||
'libffi-dev',
|
||||
'python3-setuptools',
|
||||
'python3-venv',
|
||||
'libmysqlclient-dev',
|
||||
]
|
||||
|
||||
package { $main_packages:
|
||||
|
|
Loading…
Reference in New Issue