Database management tool for Evergreen
To get started using the backend follow these steps:
For Ubuntu:
pip install virtualenv
sudo apt-get install python-dev
cd backend
sudo -s
source virtualize.sh # Create the virtualenv
deactivate
exit
sudo source virtualize.sh
python db_create.py
python run.py
For Windows terminal emulator:
pip install virtualenv
cd backend
source virtualize.sh
./create_prod_db.sh // Or create_test_db.sh to populate some test data
python run.py
To set up Postman:
- Install Postman and open it
- Select "Import" in the top left-hand corner.
- Import all files in the "postman" folder of the repo.
- Choose the "EvergreenDB" environment from the top right-hand corner of Postman
- Run the backend run.py script on your local system (see Quick Start guide above)
- Choose a Postman request from the EvergreenDB collection on the left side of Postman and click "Send" to execute the request.
To get started using the frontend follow these steps:
Ubuntu: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
Windows: https://nodejs.org/en/download/
cd fss
npm install
# To test in browser and attach vscode debugger
ng serve
# To run in electron locally with source mapping
npm run slowstart
# To run in electron locally without source mapping (faster)
npm run faststart
npm run packagelocal # for current OS
npm run packageall # for all OSs
Taken roughly from this tutorial: https://www.matthealy.com.au/blog/post/deploying-flask-to-amazon-web-services-ec2/
ssh -i /path/to/your/keyfile ec2-user@your_public_dnsname_here
if you need any info for the command above... you are going to need more help than this guide
Change to the apps user, and go to the evergreen dir that was already created:
[ec2-user@ip-172-31-14-180 ~]$ sudo su apps
[apps@ip-172-31-14-180 ~]$ cd ~/evergreendb
Clone git repo or if already cloned just do a git pull to grab the latest version
[apps@ip-172-31-14-180 ~]$ git pull
Setup virtual env if its not already setup following directions in the link above then source the virtualenv and install any new python packages:
[apps@ip-172-31-14-180 evergreendb]$ cd backend/
[apps@ip-172-31-14-180 backend]$ source virtualize.sh
[apps@ip-172-31-14-180 evergreendb]$ pip install -r requirements.txt
At this point you can setup nginx as the web server following directions in the link but it should be done already. Finally kill any gunicorn processes and restart them:
[apps@ip-172-31-14-180 evergreendb]$ pkill gunicorn
[apps@ip-172-31-14-180 evergreendb]$ ./run_prod_backend.sh
cd backend
source virtualize.sh
./create_prod_db.sh // Or create_test_db.sh to populate some test data
python run.py
sudo tail -f /var/log/nginx/error.log
cd fss
npm i -g npm
cd fss
npm install
# Edit VERSION file with correct version
./update_version.sh
Navigate to the Settings page of the app to see it.
Navigate to the /version endpoint to see it.