Add deploy script
This commit is contained in:
parent
62ff08c654
commit
e63309e5e3
16
deploy.sh
Normal file
16
deploy.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin
|
||||
|
||||
BASEPATH=/home/developers/temperature-alarm
|
||||
|
||||
# Fetch changes
|
||||
git -C $BASEPATH pull
|
||||
|
||||
# Update frontend
|
||||
cp $BASEPATH/frontend/* -r /var/www/html
|
||||
chown www-data:www-data -R /var/www/html
|
||||
|
||||
# Update backend
|
||||
docker stop api
|
||||
docker build --tag api $BASEPATH/backend/Api
|
||||
docker run -d -p 8080:80 -p 8081:443 -p 5000:5000 --name api --rm api
|
||||
|
Loading…
Reference in New Issue
Block a user