Please refer here for setting up the development environment.
Install and setup PostgreSQL with (version >= 10).
Also, install nodejs with version >= 14 and < 15.
Then, switch to postgres user by running sudo su postgres
.
As postgres user, run sh scripts/postgres_db_init.sh
.
Inside the cms folder, run the following commmands in order.
npm install -g yarn
yarn install
UNSKIP_DECR=TRUE node scripts/env-Decrypter.sh
yarn build
yarn start
Pass an enviroment variable DISCORD URL
with the correct discord webhook link.
Run the following commands to start the server:
npm ci
npm run build
npm start
To check the status, memory and other get logs from the application when the server is running in production, run npm run pm2 monit
.
To stop the server, run npm run pm2 kill
. This will stop all the running processes for the cms.
If still some node processes are left, run killall node
.
If the application has stopped or you want to check for errors, visit the cms
folder and then visit the LOGS
folder.
You will find the different server log files, and you can open and then check for the log.
Since we are using yarn for installing packages, we need to install the latest yarn packages for the same.
It is necessary and important to update the packages when there is major release (or at least every 6 months). For example, there can be major release of next.js every year and you will need to update the version
Refer the following for upgrading the package(s):