Skip to content

Latest commit

 

History

History
53 lines (45 loc) · 1.47 KB

README.md

File metadata and controls

53 lines (45 loc) · 1.47 KB

ReliefBox

A simple web app for relief. https://relief-system-webapp.azurewebsites.net/

Description

Synopsis: a flask python app.

Workflow: upload data of beneficiaries, start distribution, check if beneficiaries are eligible, download report.

Setup

on Azure

  1. Deploy the web app to Azure App Service
  2. Add necessary keys as environmental variables. From Azure Portal, App Service > Configuration > New application setting
SQL_USERNAME=...
SQL_PASSWORD=...
COSMOS_KEY=...
MODE=online

build as standalone app

pyinstaller --onefile --add-data 'templates;templates' --add-data 'static;static' --add-data 'data;data' --add-data './*.py;.' app.py

on Raspberry Pi 4

  1. Create wireless access point
  2. Clone this repository
$ git clone https://github.com/rodekruis/relief-app.git
$ cd relief-app
  1. Set offline mode in .env
$ echo -n "MODE=offline" > .env
  1. Install app dependencies and run it
$ sudo apt-get update
$ sudo apt-get install libatlas-base-dev libcblas-dev g++ unixodbc-dev
$ pip install -r requirements.txt
$ python app.py

Debug connection issues (to be improved):

$ sudo systemctl stop hostapd
$ sudo systemctl unmask hostapd
$ sudo systemctl enable hostapd
$ sudo systemctl start hostapd