Revision 54950
Added by Argiro Kokogiannaki over 5 years ago
modules/uoa-services-portal/trunk/explore/src/app/home/home.component.html | ||
---|---|---|
459 | 459 |
Use our monitoring services and easily track all relevant research results. |
460 | 460 |
</div> |
461 | 461 |
<p> |
462 |
<a target="_blank" href="https://monitor.openaire.eu" class="el-link uk-button uk-button-default">
|
|
462 |
<a target="_blank" [href]="'https://'+(properties.environment =='beta'?'beta.openaire.eu/monitor':'monitor.openaire.eu')" class="el-link uk-button uk-button-default">
|
|
463 | 463 |
OpenAIRE.MONITOR |
464 | 464 |
</a> |
465 | 465 |
</p> |
modules/uoa-services-portal/trunk/explore/server.ts | ||
---|---|---|
28 | 28 |
import { provideModuleMap } from '@nguniversal/module-map-ngfactory-loader'; |
29 | 29 |
|
30 | 30 |
// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine) |
31 |
app.engine('html', ngExpressEngine({ |
|
32 |
bootstrap: AppServerModuleNgFactory, |
|
33 |
providers: [ |
|
34 |
provideModuleMap(LAZY_MODULE_MAP) |
|
35 |
] |
|
36 |
})); |
|
31 |
// app.engine('html', ngExpressEngine({ |
|
32 |
// bootstrap: AppServerModuleNgFactory, |
|
33 |
// providers: [ |
|
34 |
// provideModuleMap(LAZY_MODULE_MAP) |
|
35 |
// ] |
|
36 |
// })); |
|
37 |
// be able to get request and get domain from there |
|
38 |
app.engine('html', (_, options, callback) => { |
|
39 |
let engine = ngExpressEngine({ |
|
40 |
bootstrap: AppServerModuleNgFactory, |
|
41 |
providers: [ |
|
42 |
{ provide: 'request', useFactory: () => options.req, deps: [] }, |
|
43 |
provideModuleMap(LAZY_MODULE_MAP) |
|
44 |
] |
|
45 |
}); |
|
46 |
engine(_, options, callback); |
|
47 |
}); |
|
37 | 48 |
|
38 | 49 |
app.set('view engine', 'html'); |
39 | 50 |
app.set('views', join(DIST_FOLDER, 'browser')); |
modules/uoa-services-portal/trunk/explore/deploy/prepareDeploy.sh | ||
---|---|---|
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 properties service to have the url for the deployment environment!!'; |
|
15 |
# echo -n "Press key:"; |
|
16 |
# read -n1 ans |
|
17 |
# echo -n "Pressed"; |
|
18 |
# pico ../src/app/openaireLibrary/utils/properties/environment-specific.service.ts; |
|
19 |
# echo 'For Production keep meta for bots'; |
|
20 |
# echo -n 'Check index.html: For test keep meta for noindex, for production remove noindex and keep meta for Search engines verification'; |
|
21 |
# echo -n "Press key:"; |
|
22 |
# read -n1 ans |
|
23 |
# echo -n "Pressed"; |
|
24 |
# pico ../src/index.html; |
|
25 |
# echo -n 'Check Robots.txt: For test and beta add "Diasallow /", for production remove it!'; |
|
26 |
# echo -n "Press key:"; |
|
27 |
# read -n1 ans |
|
28 |
# echo -n "Pressed"; |
|
29 |
# pico ../src/robots.txt; |
|
30 |
# rm -rf ../src/assets/common-assets/.svn/; |
|
31 |
# rm -rf ../src/app/openaireLibrary/.svn/; |
|
32 |
# cd ..; npm run build:dynamic; cd deploy; |
|
33 |
# rm -rf ../src ../node_modules ../.idea/ ../installOpenaireLib.sh; |
|
34 |
# cd ..; rm -rf deploy; |
|
35 |
# echo 'Now copy to the server!' |
|
36 |
##<-- to here |
|
37 |
|
|
38 |
#Deploy instructions! |
|
39 |
#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 |
|
40 |
#copies of previous deployments exist in "/home/argiro.kokogiannaki/deployments-folder/dashboardYYYY-MM-DD" |
|
41 |
#run "npm i" |
|
42 |
#become nodejs user: "sudo su nodejs -s /bin/bash" |
|
43 |
#go to "cd /srv/www/portal" |
|
44 |
#cp files from "cp -r HOME_PATH/deployments-folder/* ." |
|
45 |
#restart portal "pm2 restart openaire" |
Also available in: Unified diff
[Trunk]
Domain change:
Update server.ts to be able to read domain from request
Home:
Update home page urls to dashboards- use environment property