Sharing the Sitecore JSS
setup steps that we usually follow in the project :
Sitecore Version - 10.x
1.
JSS Setup on CM and CD server
a.
Install the JSS package on CM server by downloading it from
Sitecore site.
b.
Once installed, generate the JSS API Key and publish it.
c.
Test the JSS URL on CM server. https://jss.sitecore.com/docs/client-frameworks/getting-started/jss-server-install
d.
Install the JSS manually on CD server. Kudu access is
required for this. https://jss.sitecore.com/docs/client-frameworks/getting-started/jss-server-install
e.
Same API key should work on both CD and CM servers now.
2.
Deploying the code manually on CM and CD server:
a.
First publish the Sitecore web solution on both CM and CD
servers. This will publish the config file overrides that are present in
solution.
b.
Build the UI solution. It will copy the output to React-JSS
solution.
c.
Build the React-JSS solution. It will copy the output to
Node-Proxy solution.
d.
Copy the Sitecore/config files manually to both CM and CD
servers
e.
Deploy the app with jss deploy items command for English.
Section 3.2 - https://jss.sitecore.com/docs/client-frameworks/getting-started/app-deployment
f.
Create the ES language in Sitecore
g.
Repeat step e for Spanish language
h.
Copy the dist folder manually to both CM and CD
Errors:
1.
Speak-Layout.cshtml error. Fix is to change role in web.config
to “ContentManagement” from “ContentManagement, Indexing” – Need to be done on
every environment
2.
JSS Development workflow needs to be changed on every
environment - https://jss.sitecore.com/docs/fundamentals/dev-workflows/code-first
3.
CD server throwing error for master db. Remove the DB name for
CD server in JSS config file. – This needs to be done on every environment
4.
Font files giving 404. Needed to add mimetype in web.config –
Needs to be done on every environment
Manual
changes on every environment:
·
web.config - Add mimetype for otf fonts in – Both CM and CD
·
web.config – change role from “ContentManagement,
Indexing” to “ContentManagement”
·
JSS Development workflow, mark tasks as final
·
Remove the master db reference from JSS config on CD server only
·
Remove the / from solr URL in connection string file
·
Correct the domain names in connection string file
·
Owin.authentication.identityserver.config change Sitecore
identity URL
No comments:
Post a Comment