1 |
54367
|
argiro.kok
|
#ATTENTION
|
2 |
|
|
#DON'T run it in svn folder - it REMOVES files
|
3 |
56822
|
argiro.kok
|
#Copy project in another location eg "deploy-folder"
|
4 |
|
|
#go to "deploy-folder/deploy"
|
5 |
|
|
#uncomment the proper commands
|
6 |
54622
|
argiro.kok
|
#run the script
|
7 |
52604
|
argiro.kok
|
|
8 |
56822
|
argiro.kok
|
# cp theproperties file according to the deploy environment!!!
|
9 |
|
|
## uncommect one of the following -->
|
10 |
54622
|
argiro.kok
|
# cp beta-properties.json ../src/assets/env-properties.json;
|
11 |
56822
|
argiro.kok
|
# cp production-properties.json ../src/assets/env-properties.json;
|
12 |
54622
|
argiro.kok
|
|
13 |
52604
|
argiro.kok
|
## uncommect from here-->
|
14 |
57046
|
argiro.kok
|
# printf '\nCheck that you have the correct properties file';
|
15 |
56822
|
argiro.kok
|
# echo -n "Press key:";
|
16 |
|
|
# read -n1 ans
|
17 |
|
|
# pico ../src/assets/env-properties.json;
|
18 |
57046
|
argiro.kok
|
# printf '\nCheck the properties file version';
|
19 |
|
|
# echo -n "Press key:";
|
20 |
|
|
# read -n1 ans
|
21 |
|
|
# pico ../src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
|
22 |
56822
|
argiro.kok
|
# echo 'For Production keep meta for bots';
|
23 |
57046
|
argiro.kok
|
# printf '\n\nCheck index.html: For test and beta keep meta for noindex, for production remove noindex and keep meta for Search engines verification';
|
24 |
|
|
# printf '\nUpdate css/ js files version!';
|
25 |
56822
|
argiro.kok
|
# echo -n "Press key:";
|
26 |
|
|
# read -n1 ans
|
27 |
|
|
# echo -n "Pressed";
|
28 |
|
|
# pico ../src/index.html;
|
29 |
|
|
# echo -n 'Check Robots.txt: For test and beta add "Diasallow /", for production remove it!';
|
30 |
|
|
# echo -n "Press key:";
|
31 |
|
|
# read -n1 ans
|
32 |
56941
|
argiro.kok
|
# pico ../src/robots.txt;
|
33 |
56822
|
argiro.kok
|
# echo -n "Pressed";
|
34 |
54622
|
argiro.kok
|
# rm -rf ../src/assets/common-assets/.svn/;
|
35 |
|
|
# rm -rf ../src/app/openaireLibrary/.svn/;
|
36 |
56318
|
argiro.kok
|
# cd ..; npm run build:ssr; cd deploy;
|
37 |
54949
|
argiro.kok
|
# rm -rf ../src ../node_modules ../.idea/ ../installOpenaireLib.sh; cd ../; rm -rf deploy;
|
38 |
52604
|
argiro.kok
|
# echo 'Now copy to the server!'
|
39 |
54367
|
argiro.kok
|
|
40 |
52604
|
argiro.kok
|
##<-- to here
|
41 |
|
|
|
42 |
54367
|
argiro.kok
|
#Deploy instructions!
|
43 |
56822
|
argiro.kok
|
#copy "deploy-folder" in beta.connect.openaire.eu or connect.openaire.eu
|
44 |
|
|
#copies of previous deployments exist in "/home/argiro.kokogiannaki/connect-portal/connectYYYY-MM-DD"
|
45 |
|
|
#run "npm i"
|
46 |
|
|
#become nodejs user to be able to copy the files: "sudo su nodejs -s /bin/bash"
|
47 |
|
|
#check what is running "pm2 list"
|
48 |
|
|
#portal files exist in "/srv/www/portal/connect"
|
49 |
56941
|
argiro.kok
|
#copy deployment files to the portal folder "cp -r /home/argiro.kokogiannaki/connect-portal/connectYYYY-MM-DD/* /srv/www/portal/connect"
|
50 |
56822
|
argiro.kok
|
#restart portal to get the changes "pm2 restart connect"
|