Rewrite of the original temperature-ops-bot that was deployed on GCP.
Requires the following to be installed:
- GCP Datastore Emulator
- ngrok
Tokens are expected to be available in the secrets.json
file as:
{
"telegram-bot": "BOT TOKEN FROM TELEGRAM API",
"project-url": "GCP PROJECT URL / LOCAL DEV SERVER URL"
}
gcloud config set project <PROJECT_NAME>
# Start the datastore emulator server
gcloud beta emulators datastore start
# Export emulation configuration
gcloud beta emulators datastore env-init > set_vars.cmd && set_vars.cmd && del set_vars.cmd
set FLASK_ENV=development
python -m src.wsgi
# Expose server to internet-facing URL
ngrok http 5000 -region ap
# Configure bot webhook
python webhookHelper.py
pytest -q n auto --tb=no