usnistgov / oar-pdr

The NIST Open Access to Research (OAR) Public Data Repository (PDR) system software
11 stars 10 forks source link

Fix/internal pdr backend #67

Closed deoyani closed 5 years ago

deoyani commented 5 years ago

This branch fixes issue with the internal PDR which was not working as it was not getting proper value for backend api. After adding small fix to service, it is fixing the problem. Localdeploy works fine.

RayPlante commented 5 years ago

I just ran under publish instead of demo, and the 1491 sample submission comes up fine, suggesting the problem I saw was with demo. Looking into it...

RayPlante commented 5 years ago

I found the problem with running under demo: a bit of code in config.service.ts that is meant to detect when running stand-alone and adjusts where the config file comes from; it was getting triggered unintentionally int-pdr is running under a special port, as it does under demo.

This branch runs properly under publish, so I will accept the PR.

deoyani commented 5 years ago

When you run locally (without docker local deploy, running directly npm run start etc) we do not need /pdr in the path to get assets/environment.json It was a little hack we did to make sure things work fine with nginx proxy, /od/id/ And /pdr/about page etc. In future we can find some better way to fix the path and routing issue.
This is currently a simple fix for docker, nginx proxy , angular app for keeping /od/id path clear to only resolve given .