Add script udapte web apps

This commit is contained in:
Mathieu Sanchez 2019-05-08 13:33:08 +09:00
parent 390bdad641
commit 828b290685
5 changed files with 52 additions and 1 deletions

View File

@ -4,5 +4,10 @@ echo "
alias restart-api='docker restart c2a-api-prod' alias restart-api='docker restart c2a-api-prod'
alias restart-api-dev='docker restart c2a-api-dev' alias restart-api-dev='docker restart c2a-api-dev'
export PATH=$PATH:/root/.bin alias update-web-platform='nohup /root/.bin/update-web-platform.sh &>> /var/log/c2a/update-web-platform.log&'
alias update-web-platform-dev='nohup /root/.bin/update-web-platform-dev.sh &>> /var/log/c2a/update-web-platform-dev.log&'
alias update-web-app='nohup /root/.bin/update-web-app.sh &>> /var/log/c2a/update-web-app.log&'
alias update-web-app-dev='nohup /root/.bin/update-web-app-dev.sh &>> /var/log/c2a/update-web-app-dev.log&'
# export PATH=$PATH:/root/.bin
" > /root/.bashrc " > /root/.bashrc

View File

@ -0,0 +1,12 @@
#!/bin/bash
echo "\nStart Buildind Web App Dev"
cd /web/web-app/dev
git pull
rm -rdf node_modules
npm install
npm run build
rm -rdf /var/www/html/c2a-web-app-dev/*
cp -R dist/c2a-web-app/* /var/www/html/c2a-web-app-dev/
echo "Build finish Web App Dev\n"

View File

@ -0,0 +1,12 @@
#!/bin/bash
echo "\nStart Buildind Web App Prod"
cd /web/web-app/prod
git pull
rm -rdf node_modules
npm install
npm run build-prod
cp -rdf /var/www/html/c2a-web-app/*
cp -R dist/* /var/www/html
echo "Build finish Web App Prod\n"

View File

@ -0,0 +1,11 @@
#!/bin/bash
echo "\Start Buildind Web Platform Dev"
cd /web/web-platform/dev
git pull
npm install
npm run build
cp -rdf /var/www/html/c2a-web-platform-dev/*
cp -R dist/c2a-web-platform/* /var/www/html/c2a-web-platform-dev
echo "Build finish Web Platform Dev\n"

View File

@ -0,0 +1,11 @@
#!/bin/bash
echo "\Start Buildind Web Platform Prod"
cd /web/web-platform/prod
git pull
npm install
npm run build-prod
cp -rdf /var/www/html/c2a-web-platform/*
cp -R dist/* /var/www/html
echo "Build finish Web Platform Prod\n"