OpenCerts / legacy-templates

Apache License 2.0
0 stars 25 forks source link

How to go to production #17

Closed nikhilranosys closed 5 years ago

nikhilranosys commented 5 years ago

I have generated pull request for SMU templates and our team will proceed with the testing now using netlify link in test file. Is this the correct way of testing the templates before pull request review?

After we are done with testing and OpenCerts team merge it, will we be able to verify our certificates directly on https://opencerts.io ? or there is some more steps.

rjchow commented 5 years ago

I've recently added a way to configure the legacy renderer url for opencerts-website, you may use that functionality to point to your branch preview for this repo to do your preview https://github.com/OpenCerts/opencerts-website/pull/407

once your changes have been merged here you will be able to verify certificates on opencerts.io if you have completed the issuer identity steps which is submission to our registry (and/or) DNS-TXT records

nikhilranosys commented 5 years ago

Thanks for the response. I tried the solution as per latest changes but getting error.

After running npm run start on legacy renderer when I run npm run start:local on opencerts website (after taking pull from master) I got below error on node console

> opencerts-website@2.0.0 start:local D:\Local Disk\New\Desktop\Projects\smu\opencerts\opencerts-website
> LEGACY_RENDERER_URL="http://localhost:3000" next start -p 3001

'LEGACY_RENDERER_URL' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opencerts-website@2.0.0 start:local: `LEGACY_RENDERER_URL="http://localhost:3000" next start -p 3001`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencerts-website@2.0.0 start:local script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Nikhil Gaur\AppData\Roaming\npm-cache\_logs\2019-08-22T03_58_49_148Z-debug.log
rjchow commented 5 years ago

not on node console, you need to run it on your shell -- i don't have instructions for how to set the environmental variables on windows

for example on linux:

LEGACY_RENDERER_URL=https://deploy-preview-11--vigilant-newton-0ec838.netlify.com/ npm run start

if you just want to run it against localhost you can just run npm run start:local directly without setting the environmental variable

nikhilranosys commented 5 years ago

I changed start:local to below on my windows environment to make it work for me

"start:local": "set LEGACY_RENDERER_URL=http://localhost:3000 && next start -p 3001 & LEGACY_RENDERER_URL="

Apart from this I noticed that you are setting environment variable with name LEGACY_RENDERER_URL but getting with name LEGACY_URL in next.config.js file. I changed that as well after that only it work.

rjchow commented 5 years ago

thanks nikhil can you see if this suits your needs?

https://github.com/OpenCerts/opencerts-website/pull/408

On Thu, Aug 22, 2019 at 1:52 PM nikhilranosys notifications@github.com wrote:

I changed start:local to below on my windows environment to make it work for me

"start:local": "set LEGACY_RENDERER_URL=http://localhost:3000 && next start -p 3001 & LEGACY_RENDERER_URL="

Apart from this I noticed that you are setting environment variable with name LEGACY_RENDERER_URL but getting with name LEGACY_URL in next.config.js file https://github.com/OpenCerts/opencerts-website/pull/407/files#diff-5d0c276360a637d1b787a57760665fbeR28. I changed that as well after that only it work.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/OpenCerts/legacy-templates/issues/17?email_source=notifications&email_token=AGUNVSWGE5RQTQWZYWTFBVDQFYSQZA5CNFSM4IOF3UZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4363IQ#issuecomment-523759010, or mute the thread https://github.com/notifications/unsubscribe-auth/AGUNVSWOB5ZNINTTHKPNWKDQFYSQZANCNFSM4IOF3UZQ .

nikhilranosys commented 5 years ago

Yes, this too worked.

rjchow commented 5 years ago

thanks, merged