Updating Shadow Store
To update Shadow Store, follow these steps:
Before Updating
-
Make a backup of your important files:
.envfile - Contains your configuration settingsstaticfolder - Houses your custom themes and assetsfilesfolder - Contains your uploaded files and data
Store these backups in a safe location outside the installation directory
Update Process
Forever is used in this example as per the installation guide, but any process manager can be used (PM2, Nodemon, etc.)
For forever, you will have to get the PROCESSID via running forever list and finding the valid ID of the process. It will be the number inside of brackets (aka: []) just before the UID.
-
Prepare for Update
ImportantFor major version updates (e.g., 1.x to 2.x), completely stop the application:
Useforever stop PROCESSIDif using Forever or terminate the running Node.js process however you normally would.
For minor updates, a restart at the end is sufficient. -
Delete the following files/folders:
package.jsonserver.jsbuildfolder - Must be completely deleted, not just replacedImportant: Simply replacing files in the build folder can cause errors due to mismatched or obsolete files
Note: Do NOT delete your backed-up files!
-
Download the latest release from Shadow Store Releases
- Check release notes for specific update instructions
- Some updates may require you to update npm packages or add new directories
- Download the appropriate version
- Check release notes for specific update instructions
-
Copy the new files to your installation directory
- Extract the downloaded release
- Copy all files except the
.env,staticandfilesfolders
-
If the release notes mention package updates:
- Delete
package-lock.jsonandnode_modulesfolder - Run
npm installto install new dependencies - Wait for installation to complete
- Delete
-
Check release notes for any
.envfile changes- Update your
.envfile with any new required variables - Keep your existing configuration values
- Add any new required settings
- Update your
-
Restore your backed-up folders if needed:
staticfolder - For assetsfilesfolder - For product content
-
Restart Shadow Store
Update Type- For major updates: Use
forever start server.jsif using Forever - For minor updates: Use
forever restart PROCESSIDif using Forever
- Or use your preferred process manager's restart command
- Check logs for any startup errors
- For major updates: Use