1 |
53600
|
argiro.kok
|
##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 |
|
|
## uncommect from here-->
|
8 |
56317
|
argiro.kok
|
#choose properties based on environment
|
9 |
54624
|
argiro.kok
|
# cp beta-properties.json ../src/assets/env-properties.json;
|
10 |
56317
|
argiro.kok
|
# cp production-properties.json ../src/assets/env-properties.json;
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
# echo -n 'Check that you have the correct properties file';
|
14 |
|
|
# echo -n "Press key:";
|
15 |
|
|
# read -n1 ans
|
16 |
|
|
# pico ../src/assets/env-properties.json;
|
17 |
|
|
# echo -n 'Check Robots.txt: For test and beta add "Diasallow /", for production remove it!';
|
18 |
|
|
# echo -n "Press key:";
|
19 |
|
|
# read -n1 ans
|
20 |
|
|
# echo -n "Pressed";
|
21 |
|
|
# pico ../src/robots.txt;
|
22 |
|
|
# rm -rf ../src/assets/common-assets/.svn/;
|
23 |
|
|
# rm -rf ../src/app/openaireLibrary/.svn/;
|
24 |
56823
|
argiro.kok
|
# rm -rf ../src/assets/connect-assets/.svn/
|
25 |
53600
|
argiro.kok
|
# npm run build;
|
26 |
|
|
# echo 'Ready!';
|
27 |
55951
|
argiro.kok
|
# echo 'Now copy only "dist" to the server!'
|
28 |
53600
|
argiro.kok
|
##<-- to here
|
29 |
|
|
|
30 |
|
|
##copy "deploy-folder/dist" in demo.openaire.eu
|
31 |
|
|
##coppies of previous deployments exist in "/home/argiro.kokogiannaki/uoa-portal/connect-adminYYYY-MM-DD"
|
32 |
|
|
##become nodejs user: "sudo su nodejs -s /bin/bash"
|
33 |
|
|
##go to "cd /srv/www/portal-www"
|
34 |
|
|
##cp files from "cp -r HOME_PATH/deploy-folder/* ."
|