From d65ccc9ff591d83e38759ee4768513ab9c084612 Mon Sep 17 00:00:00 2001 From: hoa3 Date: Thu, 10 Oct 2024 13:50:48 +0200 Subject: [PATCH 1/5] dec: update documentation on new db setup --- Dev.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Dev.md b/Dev.md index b134854..6a85649 100644 --- a/Dev.md +++ b/Dev.md @@ -8,11 +8,24 @@ These are the env variables that need to be set-up: - MONGO_READ: The connection string. Can be found in Keepass -- MONGO_DATABASE: Which database to use. production or testingNew -- GITHUB_TOKEN: The Github token. Can be found in Keepass +- MONGO_DATABASE: Which database to use. testingNew for development, production for the productive website +- GITHUB_TOKEN: The Github token. Token used for the productive Website can be found in Keepass. Please create your own token from your gitHub Account for local use. - LOG_PATH: The path for the log files to be saved in. Somewhere on your system. - DATA_PATH: The path for the data files to be saved in. Somewhere on your system. +### Connection to the Database + +To connect to the database on the server you can: +1. Set up a ssh Tunneling/ Local port forwarding: +``` +ssh dev1 -L :::27017 +``` + +If you want to change the Data in the mongoDB, you can Install mongoDB Compass. It has a nice, partly intuitive interface for simple changes in the Data. +1. Install mongoDB Compass (https://www.mongodb.com/docs/compass/current/install/) +2. In mongoDB Compass: add a new connection +3. Use the connection string (MONGO_DATABASE) to connect to the dev server database. Make sure the destination number (e.g. 9898) in the connection string is the same as in the command you used for the tunneling. + ### Run Backend > - From root cd into */oss-api*
@@ -31,7 +44,6 @@ These are the env variables that need to be set-up: Use the Login Details from KeePass to access the add-Institution-View (Internal use only so far). It allows you to add new Institutions to the TodoInstitution Collection and thus put them into the cue of Institutions which are Crawled. Please read the Instructions in the Userinterface also. - ### What are ts and why are they set to null ts are timestamps that are used to check when that organization/institution were crawled. @@ -40,7 +52,6 @@ ts are timestamps that are used to check when that organization/institution were After that it will be overwritte in the database. - # Update Institutions using the github_repos.md Once someone has updated the github_repos.json file and the pull request was merged, the new or updated insitution must be added to the database. From 9cd44d863f11a19b3a82bcc115220f21603af123 Mon Sep 17 00:00:00 2001 From: hoa3 Date: Thu, 10 Oct 2024 14:15:22 +0200 Subject: [PATCH 2/5] doc: add dev.md to gitignore as dev documentation is moved to gitlab --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 11279a2..621bc33 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,5 @@ client .DS_Store -.env \ No newline at end of file +.env +.dev.md \ No newline at end of file From 7202d2a760aebefb6bd9d70431c387750dc1c6f6 Mon Sep 17 00:00:00 2001 From: hoa3 Date: Thu, 10 Oct 2024 14:19:16 +0200 Subject: [PATCH 3/5] doc: update gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 621bc33..51bd10c 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ client .DS_Store .env -.dev.md \ No newline at end of file +dev.md \ No newline at end of file From 6eaeb17cd0d4c7417484a1ed8ae7940f8ac6bb06 Mon Sep 17 00:00:00 2001 From: hoa3 Date: Thu, 10 Oct 2024 14:20:39 +0200 Subject: [PATCH 4/5] doc: remove dev.md --- Dev.md | 66 ---------------------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 Dev.md diff --git a/Dev.md b/Dev.md deleted file mode 100644 index 6a85649..0000000 --- a/Dev.md +++ /dev/null @@ -1,66 +0,0 @@ -# How to setup the dev enviroment - -## Backend - -**Pre-requirements:** NestJS, npm - -### Env Variables - -These are the env variables that need to be set-up: -- MONGO_READ: The connection string. Can be found in Keepass -- MONGO_DATABASE: Which database to use. testingNew for development, production for the productive website -- GITHUB_TOKEN: The Github token. Token used for the productive Website can be found in Keepass. Please create your own token from your gitHub Account for local use. -- LOG_PATH: The path for the log files to be saved in. Somewhere on your system. -- DATA_PATH: The path for the data files to be saved in. Somewhere on your system. - -### Connection to the Database - -To connect to the database on the server you can: -1. Set up a ssh Tunneling/ Local port forwarding: -``` -ssh dev1 -L :::27017 -``` - -If you want to change the Data in the mongoDB, you can Install mongoDB Compass. It has a nice, partly intuitive interface for simple changes in the Data. -1. Install mongoDB Compass (https://www.mongodb.com/docs/compass/current/install/) -2. In mongoDB Compass: add a new connection -3. Use the connection string (MONGO_DATABASE) to connect to the dev server database. Make sure the destination number (e.g. 9898) in the connection string is the same as in the command you used for the tunneling. - -### Run Backend - -> - From root cd into */oss-api*
-> - Run **npm i** to install all the necessary packages -> - Finally you can start the dev server with **npm run start:dev** - -## Frontend - -**Pre-requirements:** AngularJS, npm, finished backend setup - -> - From root cd into */frontend*
-> - Run **npm i** to install all the necessary packages
-> - Finally you can start the dev server with **npm run start** - -# Update Institutions using add-Institution Mask - -Use the Login Details from KeePass to access the add-Institution-View (Internal use only so far). It allows you to add new Institutions to the TodoInstitution Collection and thus put them into the cue of Institutions which are Crawled. Please read the Instructions in the Userinterface also. - -### What are ts and why are they set to null - -ts are timestamps that are used to check when that organization/institution were crawled. - -"null" is the intial value so that the new organization/institution will be crawled with the next crawl run. - -After that it will be overwritte in the database. - -# Update Institutions using the github_repos.md - -Once someone has updated the github_repos.json file and the pull request was merged, the new or updated insitution must be added to the database. - -This can be done in 4 easy steps: - -1. Open the productive Website (or local, Choose the **production** DB and then todoInstitution collection.) -2. Login. The Credentials can be found in Keepass. -3. Click **Add/Edit an Institution**. -4. Check if the new repository details in "github_repos.md" are valid: the organisation shortname has to match the name in the url of the GitHub page. -5. Add the new Organisation or Edit if nessecary (You can reset the timestamp to cue the institution for crawling). - From b24cee052fffba98a6e624056f866ffd7ed7492e Mon Sep 17 00:00:00 2001 From: hoa3 Date: Thu, 10 Oct 2024 14:24:10 +0200 Subject: [PATCH 5/5] doc: ad correct gitignore Dev.md --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 51bd10c..5e46321 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ client .DS_Store .env -dev.md \ No newline at end of file +Dev.md \ No newline at end of file