Discover curated blogs and articles fostering collaboration, innovation, and continuous learning across the Accelerator Lab networks with the UNDP Insights Hub.
Before setting up the code locally, ensure you have the following prerequisites installed:
- Node.js: Make sure you have Node.js installed. You can check your version by running
node --version.
To set up the application locally, follow these steps:
-
Clone the repository:
git clone https://github.com/UNDP-Accelerator-Labs/insights.git -
Install dependencies: Run
npm installoryarn installin the project root directory. -
Create
.envfile: Create a.envfile in the project root directory and add the following environment variables:DB_USER='' DB_HOST='' DB_NAME='' DB_PASS='' DB_PORT='' production= L_DB_USER='' L_DB_HOST='' L_DB_NAME='' L_DB_PASS='' LOGIN_DB_NAME='' LOGIN_DB_PORT='' LOGIN_DB_HOST='' LOGIN_DB_USERNAME='' LOGIN_DB_PASSWORD='' NODE_ENV='local' NLP_API_URL = "" API_TOKEN = '' APP_SECRET=''
-
Start the application: Run
npm startto start the application.
Run
make -s build
to build the docker image.
Use make -s git-check to verify that the current working copy is clean and
that no unwanted (or uncommit) files will be included in the image.
Make sure to log in to azure via make azlogin.
Run
make -s build
make -s dockerpush
to build the image and push it to azure. Make sure to update the image in the Deployment Center. This is only if you need to test non major version changes. For proper deployment use the deploy functionality as described below.
Make sure to be on the master branch with a clean working copy.
Run
make -s deploy