Leafwell is apps for herbal identification through images, this is the part of the project as web api to deliver data to mobile apps.
- Python 3.6
- SQLite/MySQL
- Ubuntu
sudo apt-get install python3-pip
sudo pip3 install virtualenv
python3 -m venv venv
source venv/bin/activate
pip3 install --upgrade pip
pip3 install -r requirements.txt
- Copy
.env.example
to.env
- Fill the right config on
.env
export FLASK_APP=main.py
flask db init
flask db migrate
flask db upgrade
flask seed-data
flask run
- Configure serverless VPC, link
- Create Cloud SQL, and connect them to serverless VPC
- Deploy the image using cloud builds and cloud run
git clone https://github.com/sahalaww/bangjek-web
cd bangjek-web
cp .env.example .env
gcloud builds submit --tag gcr.io/$PROJECT_ID/$IMAGE_NAME:$version
gcloud run deploy $SERVICE_NAME --image $IMAGE_URL --region $REGION
You can refer to Cloud Build documentation, link already on reference.
https://herb-bangjek-oiabruca3q-et.a.run.app
You can visit our wiki : link