Agregado deployer

This commit is contained in:
Daniel Cortes
2020-06-03 07:08:01 -04:00
parent 5bd4d6c781
commit f505139416
2 changed files with 9 additions and 1 deletions

View File

@@ -25,5 +25,5 @@ deploy:
## Sync the project to the deploy route ## Sync the project to the deploy route
- apt-get install rsync -y - apt-get install rsync -y
- rsync -rvz ./ deployer@142.93.158.54:/var/www/musiclist.danielcortes.xyz/server/ - rsync -rvz ./ deployer@142.93.158.54:/var/www/musiclist.danielcortes.xyz/server/
- ssh deployer@142.93.158.54 '/var/www/musiclist.danielcortes.xyz/server/deploy.sh' - ssh deployer@142.93.158.54 'sh /var/www/musiclist.danielcortes.xyz/server/deploy.sh'

8
deploy.sh Normal file
View File

@@ -0,0 +1,8 @@
# If venv doesnt exists
[ -d venv/ ] && python3 -m venv venv
# Activate venv
. venv/bin/activate
# Install all requirements
pip install -r requirements.txt
# Restart systemctl unit
sudo /bin/systemctl restart musiclist