^
This commit is contained in:
parent
5df920743b
commit
410ffa4e81
1 changed files with 17 additions and 15 deletions
|
@ -407,10 +407,10 @@ fi
|
||||||
# Activate the virtual environment
|
# Activate the virtual environment
|
||||||
source $HD/env/saleor/bin/activate
|
source $HD/env/saleor/bin/activate
|
||||||
# Make sure pip is upgraded
|
# Make sure pip is upgraded
|
||||||
sudo -u $UN python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
wait
|
wait
|
||||||
# Install Django
|
# Install Django
|
||||||
sudo -u $UN pip3 install Django
|
pip3 install Django
|
||||||
wait
|
wait
|
||||||
# Create a Temporary directory to generate some files we need
|
# Create a Temporary directory to generate some files we need
|
||||||
#sudo -u $UN mkdir $HD/django
|
#sudo -u $UN mkdir $HD/django
|
||||||
|
@ -418,8 +418,9 @@ wait
|
||||||
# Create the project folder
|
# Create the project folder
|
||||||
#sudo -u $UN django-admin.py startproject saleor
|
#sudo -u $UN django-admin.py startproject saleor
|
||||||
# Install uwsgi
|
# Install uwsgi
|
||||||
sudo -u $UN pip3 install uwsgi
|
pip3 install uwsgi
|
||||||
wait
|
wait
|
||||||
|
deactivate
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
@ -611,42 +612,45 @@ wait
|
||||||
# Simlink to the prod.ini
|
# Simlink to the prod.ini
|
||||||
sudo ln -s $HD/saleor/saleor/wsgi/prod.ini $HD/env/saleor/vassals
|
sudo ln -s $HD/saleor/saleor/wsgi/prod.ini $HD/env/saleor/vassals
|
||||||
wait
|
wait
|
||||||
|
source $HD/env/saleor/bin/activate
|
||||||
# Make sure we're in the project root directory for Saleor
|
# Make sure we're in the project root directory for Saleor
|
||||||
cd $HD/saleor
|
cd $HD/saleor
|
||||||
# Was the -v (version) option used?
|
# Was the -v (version) option used?
|
||||||
if [ "vOPT" = "true" || $VERSION != "" ]; then
|
if [ "vOPT" = "true" || $VERSION != "" ]; then
|
||||||
# Checkout the specified version
|
# Checkout the specified version
|
||||||
sudo -u $UN git checkout $VERSION
|
git checkout $VERSION
|
||||||
wait
|
wait
|
||||||
fi
|
fi
|
||||||
# Install the project requirements
|
# Install the project requirements
|
||||||
sudo -u $UN pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
wait
|
wait
|
||||||
# Install the decoupler for .env file
|
# Install the decoupler for .env file
|
||||||
sudo -u $UN pip3 install python-decouple
|
pip3 install python-decouple
|
||||||
wait
|
wait
|
||||||
# Set any secret Environment Variables
|
# Set any secret Environment Variables
|
||||||
sudo -u $UN export ADMIN_PASS="$ADMIN_PASS"
|
export ADMIN_PASS="$ADMIN_PASS"
|
||||||
# Install the project
|
# Install the project
|
||||||
sudo -u $UN npm install
|
npm install
|
||||||
wait
|
wait
|
||||||
# Run an audit to fix any vulnerabilities
|
# Run an audit to fix any vulnerabilities
|
||||||
#sudo -u $UN npm audit fix
|
#sudo -u $UN npm audit fix
|
||||||
#wait
|
#wait
|
||||||
# Establish the database
|
# Establish the database
|
||||||
sudo -u $UN python3 manage.py migrate
|
python3 manage.py migrate
|
||||||
wait
|
wait
|
||||||
sudo -u $UN python3 manage.py populatedb --createsuperuser
|
python3 manage.py populatedb --createsuperuser
|
||||||
wait
|
wait
|
||||||
# Collect the static elemants
|
# Collect the static elemants
|
||||||
sudo -u $UN python3 manage.py collectstatic
|
python3 manage.py collectstatic
|
||||||
wait
|
wait
|
||||||
# Build the schema
|
# Build the schema
|
||||||
sudo -u $UN npm run build-schema
|
npm run build-schema
|
||||||
wait
|
wait
|
||||||
# Build the emails
|
# Build the emails
|
||||||
sudo -u $UN npm run build-emails
|
npm run build-emails
|
||||||
wait
|
wait
|
||||||
|
# Exit the virtual environment here? _#_
|
||||||
|
sudo -u $UN deactivate
|
||||||
# Set ownership of the app directory to $UN:www-data
|
# Set ownership of the app directory to $UN:www-data
|
||||||
sudo chown -R $UN:www-data $HD/saleor
|
sudo chown -R $UN:www-data $HD/saleor
|
||||||
wait
|
wait
|
||||||
|
@ -655,8 +659,6 @@ wait
|
||||||
#sleep 5
|
#sleep 5
|
||||||
# Stop the uwsgi processes
|
# Stop the uwsgi processes
|
||||||
#uwsgi --stop $HD/saleortemp.pid
|
#uwsgi --stop $HD/saleortemp.pid
|
||||||
# Exit the virtual environment here? _#_
|
|
||||||
sudo -u $UN deactivate
|
|
||||||
# Move static files to /var/www/$HOST
|
# Move static files to /var/www/$HOST
|
||||||
sudo mv $HD/saleor/saleor$STATIC_URL /var/www/${HOST}${STATIC_URL}
|
sudo mv $HD/saleor/saleor$STATIC_URL /var/www/${HOST}${STATIC_URL}
|
||||||
sudo chown -R www-data:www-data /var/www/$HOST
|
sudo chown -R www-data:www-data /var/www/$HOST
|
||||||
|
|
Loading…
Reference in a new issue