Project

General

Profile

1
#ATTENTION
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"
5

    
6
#1. uncomment the proper property file
7
#2. uncomment the rest commands
8
#3.run the script
9
#4.Check the Deploy instructions
10

    
11
#Property files:
12
# uncommect ONE of the following according to the deploy environment!!!
13
# cp production-properties.json ../src/assets/env-properties.json;
14
# cp test-properties.json ../src/assets/env-properties.json;
15
# cp beta-properties.json ../src/assets/env-properties.json;
16

    
17
## uncommect from here-->
18
# printf  '\nCheck that you have the correct properties file\n';
19
# printf "\nPress key:";
20
# read -n1 ans
21
# pico ../src/assets/env-properties.json;
22
# printf  '\nCheck the properties file version\n';
23
# echo -n "Press key:";
24
# read -n1 ans
25
# pico ../src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
26
# printf '\nFor Production keep meta for bots';
27
# printf  '\n\nCheck index.html:\n For test keep meta for noindex, for production remove noindex and keep meta for Search engines verification';
28
# printf  '\nUpdate css/ js files version!';
29
# printf "\nPress key:";
30
# read -n1 ans
31
# printf "\nPressed";
32
# pico ../src/index.html;
33
# printf '\n\nCheck Robots.txt: \n For test and beta add "Disallow /" and comment all sitemaps, for production remove it!';
34
# printf "\nPress key:";
35
# read -n1 ans
36
# echo -n "Pressed";
37
# pico ../src/robots.txt;
38
# rm -rf ../src/assets/common-assets/.svn/;
39
# rm -rf ../src/app/openaireLibrary/.svn/;
40
# cd ..; npm run build:ssr; cd deploy;
41
# rm -rf ../src ../node_modules  ../.idea/ ../installOpenaireLib.sh;
42
# cd ..; rm -rf deploy;
43
# echo 'Now copy to the server!'
44
##<-- to here
45

    
46
#Deploy instructions!
47
#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
48
#copies of previous deployments exist in  "/home/argiro.kokogiannaki/uoa-portal/environment.exlore-YYYY-MM-DD"
49
#run "npm i"
50
#become nodejs user be able to copy the files: "sudo su nodejs -s /bin/bash"
51
#check what is running "pm2 list"
52
#portal files exist in "/srv/www/portal"
53
#copy deployment files to the portal folder cp -r /home/argiro.kokogiannaki/uoa-portal/environment.exlore-YYYY-MM-DD/* /srv/www/portal"
54
#restart portal to get the changes "pm2 restart openaire"
55
#for test  "pm2 restart test-explore"
(3-3/5)