A lightweight microservice for archiving GTFS-RT trips.
- Written in Go, providing a faster and more efficient service compared to previous versions.
- Forward-compatible-only changes.
Bustinel came about as a solution to a niche problem of mine. I'm a photographer and public transport enthusiast, and my local agency (Adelaide Metro) has a few experimental vehicles they operate periodically. My goal has been to photograph and ride these buses, and annoyingly, due to their inconsistent schedule, I had to get creative to track them down... this being the result of getting creative.
To start tracking first you'll need either a Docker or Podman installation and either MongoDB or FerretDB.
The compose file below features a FerretDB instance and Bustinel (v3) instance in a production ready state.
services:
postgres:
image: ghcr.io/ferretdb/postgres-documentdb:17-0.106.0-ferretdb-2.5.0
restart: on-failure
environment:
- POSTGRES_USER=bustinel
- POSTGRES_PASSWORD=atotallysecurepassword
- POSTGRES_DB=postgres
volumes:
- ./data:/var/lib/postgresql/data
ferretdb:
image: ghcr.io/ferretdb/ferretdb:2.5.0
restart: on-failure
environment:
- FERRETDB_POSTGRESQL_URL=postgres://bustinel:atotallysecurepassword@postgres:5432/postgres
bustinel:
image: ghcr.io/notaussie/bustinel:stable
environment:
- FEED_URL=https://example.com/vehicle-positions
- METADATA_URL=https://example.com/google.zip
- MONGO_URI=mongodb://ferretdb:27017/bustinel
- CONTACT=johndoe@example.com
networks:
default:
driver: bridgeConfigurable environment variables for Bustinel. Values labelled as required must be set or else the program will exit with a fatal error.
| Variable Name | Description | Default Value | Required |
|---|---|---|---|
MONGO_URI |
The connection string for your MongoDB instance | nil |
✅ |
FEED_URL |
The URL of the GTFS-RT feed | nil |
✅ |
FEED_REFRESH_INTERVAL |
The interval at which to refresh the GTFS-RT feed in CRON format | * * * * * |
❌ |
METADATA_URL |
The URL of the GTFS metadata file | nil |
✅ |
METADATA_REFRESH_INTERVAL |
The interval at which to refresh the metadata in CRON format | 0 * * * * |
❌ |
CONTACT |
A contactable email address for complaints. | nil |
✅ |
TIMEOUT |
The timeout duration for requests in seconds | 30 |
❌ |
