Project

General

Profile

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
6

    
7
## cp the file according to the deploy environment
8

    
9
# cp production-properties.json ../src/assets/env-properties.json;
10
# cp test-properties.json ../src/assets/env-properties.json;
11
# cp beta-properties.json ../src/assets/env-properties.json;
12

    
13
## uncommect from here-->
14
# echo -n 'Check that you have the correct properties file';
15
# echo -n "Press key:";
16
# read -n1 ans
17
# 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:";
21
# read -n1 ans
22
# echo -n "Pressed";
23
# 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:";
26
# read -n1 ans
27
# echo -n "Pressed";
28
# pico ../src/robots.txt;
29
# rm -rf ../src/assets/common-assets/.svn/;
30
# rm -rf ../src/app/openaireLibrary/.svn/;
31
# cd ..; npm run build:ssr; cd deploy;
32
# rm -rf ../src ../node_modules  ../.idea/ ../installOpenaireLib.sh;
33
# cd ..; rm -rf deploy;
34
# echo 'Now copy to the server!'
35
##<-- to here
36

    
37
#Deploy instructions!
38
#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"
40
#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"
(3-3/5)