[Trunk]
Domain change: Update server.ts to be able to read domain from request Home: Update home page urls to dashboards- use environment property git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@54950 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
11e46dee59
commit
49a74215e5
|
@ -1,45 +0,0 @@
|
|||
#ATTENTION
|
||||
#DON'T run it in svn folder - it REMOVES files
|
||||
#Copy project in another file "deploy-folder"
|
||||
#cd "deploy-folder"
|
||||
#run the script
|
||||
|
||||
## cp the file according to the deploy environment
|
||||
|
||||
# cp production-properties.json ../src/assets/env-properties.json;
|
||||
# cp test-properties.json ../src/assets/env-properties.json;
|
||||
# cp beta-properties.json ../src/assets/env-properties.json;
|
||||
|
||||
## uncommect from here-->
|
||||
# echo -n 'Check properties service to have the url for the deployment environment!!';
|
||||
# echo -n "Press key:";
|
||||
# read -n1 ans
|
||||
# echo -n "Pressed";
|
||||
# pico ../src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
|
||||
# echo 'For Production keep meta for bots';
|
||||
# echo -n 'Check index.html: For test keep meta for noindex, for production remove noindex and keep meta for Search engines verification';
|
||||
# echo -n "Press key:";
|
||||
# read -n1 ans
|
||||
# echo -n "Pressed";
|
||||
# pico ../src/index.html;
|
||||
# echo -n 'Check Robots.txt: For test and beta add "Diasallow /", for production remove it!';
|
||||
# echo -n "Press key:";
|
||||
# read -n1 ans
|
||||
# echo -n "Pressed";
|
||||
# pico ../src/robots.txt;
|
||||
# rm -rf ../src/assets/common-assets/.svn/;
|
||||
# rm -rf ../src/app/openaireLibrary/.svn/;
|
||||
# cd ..; npm run build:dynamic; cd deploy;
|
||||
# rm -rf ../src ../node_modules ../.idea/ ../installOpenaireLib.sh;
|
||||
# cd ..; rm -rf deploy;
|
||||
# echo 'Now copy to the server!'
|
||||
##<-- to here
|
||||
|
||||
#Deploy instructions!
|
||||
#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
|
||||
#copies of previous deployments exist in "/home/argiro.kokogiannaki/deployments-folder/dashboardYYYY-MM-DD"
|
||||
#run "npm i"
|
||||
#become nodejs user: "sudo su nodejs -s /bin/bash"
|
||||
#go to "cd /srv/www/portal"
|
||||
#cp files from "cp -r HOME_PATH/deployments-folder/* ."
|
||||
#restart portal "pm2 restart openaire"
|
|
@ -28,12 +28,23 @@ import { ngExpressEngine } from '@nguniversal/express-engine';
|
|||
import { provideModuleMap } from '@nguniversal/module-map-ngfactory-loader';
|
||||
|
||||
// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
|
||||
app.engine('html', ngExpressEngine({
|
||||
// app.engine('html', ngExpressEngine({
|
||||
// bootstrap: AppServerModuleNgFactory,
|
||||
// providers: [
|
||||
// provideModuleMap(LAZY_MODULE_MAP)
|
||||
// ]
|
||||
// }));
|
||||
// be able to get request and get domain from there
|
||||
app.engine('html', (_, options, callback) => {
|
||||
let engine = ngExpressEngine({
|
||||
bootstrap: AppServerModuleNgFactory,
|
||||
providers: [
|
||||
{ provide: 'request', useFactory: () => options.req, deps: [] },
|
||||
provideModuleMap(LAZY_MODULE_MAP)
|
||||
]
|
||||
}));
|
||||
});
|
||||
engine(_, options, callback);
|
||||
});
|
||||
|
||||
app.set('view engine', 'html');
|
||||
app.set('views', join(DIST_FOLDER, 'browser'));
|
||||
|
|
|
@ -459,7 +459,7 @@
|
|||
Use our monitoring services and easily track all relevant research results.
|
||||
</div>
|
||||
<p>
|
||||
<a target="_blank" href="https://monitor.openaire.eu" class="el-link uk-button uk-button-default">
|
||||
<a target="_blank" [href]="'https://'+(properties.environment =='beta'?'beta.openaire.eu/monitor':'monitor.openaire.eu')" class="el-link uk-button uk-button-default">
|
||||
OpenAIRE.MONITOR
|
||||
</a>
|
||||
</p>
|
||||
|
|
Loading…
Reference in New Issue