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
|
# 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
|
# pico ../src/robots.txt;
|
33
|
# echo -n "Pressed";
|
34
|
# rm -rf ../src/assets/common-assets/.svn/;
|
35
|
# rm -rf ../src/app/openaireLibrary/.svn/;
|
36
|
# cd ..; npm run build:ssr; cd deploy;
|
37
|
# rm -rf ../src ../node_modules ../.idea/ ../installOpenaireLib.sh; cd ../; rm -rf deploy;
|
38
|
# echo 'Now copy to the server!'
|
39
|
|
40
|
##<-- to here
|
41
|
|
42
|
#Deploy instructions!
|
43
|
#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
|
#copy deployment files to the portal folder "cp -r /home/argiro.kokogiannaki/connect-portal/connectYYYY-MM-DD/* /srv/www/portal/connect"
|
50
|
#restart portal to get the changes "pm2 restart connect"
|