Revision 56839
Added by Argiro Kokogiannaki over 4 years ago
prepareDeploy.sh | ||
---|---|---|
1 | 1 |
#ATTENTION |
2 |
#DON'T run it in svn folder - it REMOVES files |
|
3 |
#Copy project in another file "deploy-folder" |
|
4 |
#cd "deploy-folder" |
|
5 |
#run the script |
|
2 |
#DON'T run this script in svn folder - it REMOVES files |
|
3 |
#Copy project in another location "deploy-folder" |
|
4 |
# go to "deploy-folder/deploy" |
|
6 | 5 |
|
7 |
## cp the file according to the deploy environment |
|
6 |
#1. uncomment the proper property file |
|
7 |
#2. uncomment the rest commands |
|
8 |
#3.run the script |
|
9 |
#4.Check the Deploy instructions |
|
8 | 10 |
|
11 |
#Property files: |
|
12 |
# uncommect ONE of the following according to the deploy environment!!! |
|
9 | 13 |
# cp production-properties.json ../src/assets/env-properties.json; |
10 | 14 |
# cp test-properties.json ../src/assets/env-properties.json; |
11 | 15 |
# cp beta-properties.json ../src/assets/env-properties.json; |
12 | 16 |
|
13 | 17 |
## uncommect from here--> |
14 |
# echo -n 'Check that you have the correct properties file';
|
|
15 |
# echo -n "Press key:";
|
|
18 |
# printf '\nCheck that you have the correct properties file\n';
|
|
19 |
# printf -n "\nPress key:";
|
|
16 | 20 |
# read -n1 ans |
17 | 21 |
# pico ../src/assets/env-properties.json; |
18 |
# echo 'For Production keep meta for bots';
|
|
19 |
# echo -n 'Check index.html: For test keep meta for noindex, for production remove noindex and keep meta for Search engines verification';
|
|
20 |
# echo -n "Press key:";
|
|
22 |
# printf '\nFor Production keep meta for bots';
|
|
23 |
# printf '\n\nCheck index.html:\n For test keep meta for noindex, for production remove noindex and keep meta for Search engines verification';
|
|
24 |
# printf "\nPress key:";
|
|
21 | 25 |
# read -n1 ans |
22 |
# echo -n "Pressed";
|
|
26 |
# printf "\nPressed";
|
|
23 | 27 |
# pico ../src/index.html; |
24 |
# echo -n 'Check Robots.txt: For test and beta add "Diasallow /", for production remove it!';
|
|
25 |
# echo -n "Press key:";
|
|
28 |
# printf '\n\nCheck Robots.txt: \n For test and beta add "Disallow /" and comment all sitemaps, for production remove it!';
|
|
29 |
# printf "\nPress key:";
|
|
26 | 30 |
# read -n1 ans |
27 | 31 |
# echo -n "Pressed"; |
28 | 32 |
# pico ../src/robots.txt; |
... | ... | |
36 | 40 |
|
37 | 41 |
#Deploy instructions! |
38 | 42 |
#copy "deploy-folder" in beta.explore.openaire.eu, test.openaire.eu or explore.openaire.eu depending which in environment want to deploy and properties selected |
39 |
#copies of previous deployments exist in "/home/argiro.kokogiannaki/deployments-folder/dashboardYYYY-MM-DD"
|
|
43 |
#copies of previous deployments exist in "/home/argiro.kokogiannaki/uoa-portal/environment.exlore-YYYY-MM-DD"
|
|
40 | 44 |
#run "npm i" |
41 |
#become nodejs user: "sudo su nodejs -s /bin/bash" |
|
42 |
#go to "cd /srv/www/portal" |
|
43 |
#cp files from "cp -r HOME_PATH/deployments-folder/* ." |
|
44 |
#restart portal "pm2 restart openaire" |
|
45 |
#become nodejs user be able to copy the files: "sudo su nodejs -s /bin/bash" |
|
46 |
#check what is running "pm2 list" |
|
47 |
#portal files exist in "/srv/www/portal" |
|
48 |
#copy deployment files to the portal folder cp -r /home/argiro.kokogiannaki/uoa-portal/environment.exlore-YYYY-MM-DD/* /srv/www/portal" |
|
49 |
#restart portal to get the changes "pm2 restart openaire" |
|
50 |
#for test "pm2 restart test-explore" |
Also available in: Unified diff
[Explore|Trunk]
Deploy:
update properties and script instructions