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