-
Notifications
You must be signed in to change notification settings - Fork 0
/
auto_deploy.sh
50 lines (45 loc) · 2.02 KB
/
auto_deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
echo "======================================================================================================"
echo "================================ Stop previous projects and delete it ================================"
echo "======================================================================================================"
cd
sudo systemctl stop gunicorn
rm -rf webdevlab
ls -la
echo "======================================================================================================"
echo "================================ Clone repository from github ========================================"
echo "======================================================================================================"
git clone [email protected]:MdSamsuzzohaShayon/webdevlab.git
ls -la
echo "======================================================================================================"
echo "================================ Deploy Django ======================================================="
echo "======================================================================================================"
cd /home/shayon/webdevlab/server
python3 -m venv .venv
source .venv/bin/activate
echo "# Django Dot Environment" > .env
nano .env
nano core/settings.py
pip install -r requirements.txt
./manage.py makemigrations
./manage.py migrate
sudo systemctl daemon-reload
sudo systemctl restart gunicorn
# gunicorn core:application --check-config
deactivate
cd
echo "======================================================================================================"
echo "================================ Deploy Nuxt.js ======================================================"
echo "======================================================================================================"
cd /home/shayon/webdevlab/client
echo "# Nuxt.js Dot Environment" > .env
nano .env
nano nuxt.config.ts
nano utils/keys.t
npm install --legacy-peer-deps
npm run build
npm run generate
sudo rm -rf /var/www/html
sudo cp -r .output/public /var/www/html
cd
ls -la