A simple NodeJS and Express web app to show details of any planes in the sky within a given radius of your location, using data from the FlightAware AeroAPI. Perfect to quickly find where a plane you spot in the sky at home is going.
Details of flights are cached locally using node-persist to reduce API usage, and new data is only fetched from the API when the Update Flights button is clicked.
The project can be run on a Raspberry Pi as a Docker container, serving the app to your local network. Docker images are available for linux/amd64
and linux/arm/v7
.
The project is intended to be run in a Docker container. The latest image is available from Docker Hub, as tti0/wtpg:latest
, or with a specific version number (e.g. tti0/wtpg:1.3.0
).
Use docker run
or with Docker Compose, making sure to expose container port 4459 (the web app is available on this port via HTTP), and setting the correct environment variables, as below.
This command will start a new wtpg container, fetching the image from Docker Hub if needed, with the web server running on host port 4459. You will need to set the environment variables in the command, however.
docker run -p 4459:4459 -e AEROAPI_KEY=YOUR_API_KEY -e LAT=YOUR_LATITUDE -e LONG=-YOUR_LONGITUDE -e RADIUS_NM=30 tti0/wtpg:latest
All environment variables are mandatory; the app will not start without them being set.
Variable | Description | Default value |
---|---|---|
AEROAPI_KEY | String: API key for FlightAware AeroAPI | |
LAT | Float: Latitude of point around which the app searches for flights, as a signed float (e.g. 2° S = -2, 4° N = 4) | |
LONG | Float: Longitude of point around which the app searches for flights, as a signed float (e.g. 2° W = -2, 4° E = 4) | |
RADIUS_NM | Float: Diagonal radius of a square (in nautical miles) centered on (LAT, LONG) within which the app will search for flights |
git clone https://github.com/tti0/wtpg.git
cd wtpg
yarn install
yarn run dev
docker build --tag tti0/wtpg:testing --load .
docker run -p 4459:4459 -e AEROAPI_KEY=YOUR_API_KEY -e LAT=YOUR_LATITUDE -e LONG=-YOUR_LONGITUDE -e RADIUS_NM=30 tti0/wtpg:testing
(replacing x.y.z
with the release version number)
docker build --push --platform linux/arm/v7,linux/amd64 --tag tti0/wtpg:x.y.z --tag tti0/wtpg:latest .
This project is Copyright (c) tti0 2024, and licenced under the MIT License. Please see LICENSE
for full details.