Monitoring recent violators of the Monadikuikka NDZ โ PROJECT BIRDNEST
A rare and endangered Monadikuikka has been spotted nesting at a local lake.
Unfortunately some enthusiasts have been a little too curious...
Image generated by OpenAI DALL-E 2
Birdnest Report is deployed as a Docker container running Green Unicorn to serve a React app and a simple API with Flask. It includes a periodic update task that queries drone snapshots and pilot information from the public server and stores them in an SQLite database to be served to the single page app.
I'll be running Birdnest Report for a little while at http://34.88.12.123/.
It's a good idea to run the Python code in a virtual environment. Set this up with the required dependencies using the following commands.
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
Set up Node to serve the React app by running the following command in the react-app directory:
npm install
python3 init_db.py
- to create the SQLite database and table
python3 updater.py
- to launch the updater
flask run
- to launch the Flask server
npm start
- in the react-app directory
Node will serve the React app on http://localhost:3000/. The Node server is configured to proxy API requests to the Flask server at http://localhost:5000/. You can query that API yourself at http://localhost:5000/report.
To look at the database, try the following:
sqlite3 database.db
SELECT * FROM drone;
For the production deployment, I'm only running one server. I built the React app and configured Flask to serve the static files, and then built a Docker image (see the Dockerfile for details). I uploaded the Docker image to Google Artifact Registry and ran that in Google Compute Engine, adding PORT=80 to the environment.