Giter Site home page Giter Site logo

birdnest's Introduction

Birdnest Report

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...

DAllE generated image of bird and droid
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/.

Running Birdnest Report on your own machine in development mode

Installation:

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

Running:

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;

Deploying in Cloud

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.

birdnest's People

Contributors

ktrimey avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.