A Python application that runs a Speedtest and saves results in the Firebase Realtime Database.
Docker instance runs application every 15 minutes by default.
$ ./run-docker.sh
It is also possible to define own time interval, for instance:
$ ./run-docker.sh 1h
Generate the Firebase private key:
- Login to the Firebase console
- Choose existing or create a new project
- Go to project settings
- Go to "Service accounts" tab
- Click on the "Generate new private key" button
Put newly generated file in firebase/certificate.json
.
Create a configuration file in firebase/config.json
with JSON:
{
"databaseURL": "https://your-firebase-project.firebaseio.com/"
}
More available parameters: https://firebase.google.com/docs/reference/admin/python/firebase_admin#initialize_app.
$ virtualenv .environment
$ source .environment/bin/activate
$ export FIREBASE_CERTIFICATE=firebase/certificate.json
$ export FIREBASE_CONFIG=firebase/config.json
$ pip install -r requirements.txt
$ python run-poller.py