Project Dashboard API
A Python Flask app which tracks skills used in various projects
Front-end React TypeScript project can be found here
Pre-requisite
- Make sure you have installed Python 3, and pip
python3 --version # prints Python 3 version
pip3 --version # prints pip version
Run app locally
virtualenv -p /usr/bin/python3 venv # create new virtual environment venv
source venv/bin/activate # activate venv
pip3 install -r requirements.txt # installs python packages
python3 manage.py # visit app at http://localhost:8080/ping
deactivate # deactivates venv
Install new packages
pip3 install boto # installs new Python package
pip3 freeze > requirements.txt # updates requirements.txt
Build
gcloud builds submit --tag gcr.io/<PROJECT-ID>/python-flask-gcp
Deploy
-
Create two secrets on Secrets Manager named
jwt-secret
, andmongo-db-connection-string
-
Deploy to Cloud Run by running:
gcloud run deploy --image gcr.io/<PROJECT-ID>/python-flask-gcp --platform managed
- Allow Cloud Run service access to the secrets as secret environment variables. See GCP Cloud Run documentation here
Testing
pytest
pytest --cov=api
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change
Please make sure to update tests as appropriate
If you find this project helpful, please give a