2019-09-30 14:48:48 +02:00
|
|
|
#ATTENTION
|
|
|
|
#DON'T run it in svn folder - it REMOVES files
|
|
|
|
#Copy project in another location eg "deploy-folder"
|
|
|
|
#go to "deploy-folder/deploy"
|
|
|
|
#uncomment the proper commands
|
|
|
|
#run the script
|
|
|
|
|
|
|
|
# cp theproperties file according to the deploy environment!!!
|
|
|
|
## uncommect one of the following -->
|
|
|
|
# cp beta-properties.json ../src/assets/env-properties.json;
|
|
|
|
# cp production-properties.json ../src/assets/env-properties.json;
|
2019-01-09 12:05:23 +01:00
|
|
|
|
|
|
|
## uncommect from here-->
|
2019-09-30 14:48:48 +02:00
|
|
|
# printf '\nCheck that you have the correct properties file';
|
|
|
|
# echo -n "Press key:";
|
|
|
|
# read -n1 ans
|
|
|
|
# pico ../src/assets/env-properties.json;
|
|
|
|
# printf '\nCheck the properties file version';
|
|
|
|
# echo -n "Press key:";
|
|
|
|
# read -n1 ans
|
|
|
|
# pico ../src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
|
|
|
|
# echo 'For Production keep meta for bots';
|
|
|
|
# printf '\n\nCheck index.html: For test and beta keep meta for noindex, for production remove noindex and keep meta for Search engines verification';
|
|
|
|
# printf '\nUpdate css/ js files version!';
|
|
|
|
# echo -n "Press key:";
|
|
|
|
# read -n1 ans
|
|
|
|
# echo -n "Pressed";
|
|
|
|
# pico ../src/index.html;
|
|
|
|
# echo -n 'Check Robots.txt: For test and beta add "Diasallow /", for production remove it!';
|
|
|
|
# echo -n "Press key:";
|
|
|
|
# read -n1 ans
|
|
|
|
# pico ../src/robots.txt;
|
|
|
|
# echo -n "Pressed";
|
|
|
|
# rm -rf ../src/assets/common-assets/.svn/;
|
|
|
|
# rm -rf ../src/app/openaireLibrary/.svn/;
|
|
|
|
# cd ..; npm run build:ssr; cd deploy;
|
2020-06-12 19:41:07 +02:00
|
|
|
rm -rf ../src ../node_modules ../.idea/ ../installOpenaireLib.sh; ../dist/browser/assets/common-assets/.svn/; cd ../; rm -rf deploy;
|
2019-01-09 12:05:23 +01:00
|
|
|
# echo 'Now copy to the server!'
|
2019-09-30 14:48:48 +02:00
|
|
|
|
2019-01-09 12:05:23 +01:00
|
|
|
##<-- to here
|
|
|
|
|
2019-09-30 14:48:48 +02:00
|
|
|
#Deploy instructions!
|
|
|
|
#copy "deploy-folder" in beta.connect.openaire.eu or connect.openaire.eu
|
|
|
|
#copies of previous deployments exist in "/home/argiro.kokogiannaki/connect-portal/connectYYYY-MM-DD"
|
|
|
|
#run "npm i"
|
|
|
|
#become nodejs user to be able to copy the files: "sudo su nodejs -s /bin/bash"
|
|
|
|
#check what is running "pm2 list"
|
|
|
|
#portal files exist in "/srv/www/portal/connect"
|
|
|
|
#copy deployment files to the portal folder "cp -r /home/argiro.kokogiannaki/connect-portal/connectYYYY-MM-DD/* /srv/www/portal/connect"
|
|
|
|
#restart portal to get the changes "pm2 restart connect"
|