Add billing enabled and sales email to Helm chart and /settings API endpoint (#1873)

Backend work for first two tasks of
https://github.com/webrecorder/browsertrix/issues/1875

New /billing API endpoint to be added separately once we have a better
idea of what data we can get from the payment processor.
This commit is contained in:
Tessa Walsh 2024-06-25 10:55:29 -04:00 committed by GitHub
parent a7382ebb98
commit 7af3980323
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 0 deletions

View File

@ -68,6 +68,8 @@ def main():
),
"maxPagesPerCrawl": int(os.environ.get("MAX_PAGES_PER_CRAWL", 0)),
"maxScale": int(os.environ.get("MAX_CRAWL_SCALE", 3)),
"billingEnabled": is_bool(os.environ.get("BILLING_ENABLED")),
"salesEmail": os.environ.get("SALES_EMAIL"),
}
invites = init_invites(mdb, email)

View File

@ -16,4 +16,6 @@ def test_settings():
"maxPagesPerCrawl": 4,
"maxScale": 3,
"defaultPageLoadTimeSeconds": 120,
"billingEnabled": False,
"salesEmail": "sales@webrecorder.org",
}

View File

@ -58,6 +58,10 @@ data:
MAX_CRAWLER_MEMORY: "{{ .Values.max_crawler_memory }}"
BILLING_ENABLED: "{{ .Values.billing_enabled }}"
SALES_EMAIL: "{{ .Values.sales_email }}"
---
apiVersion: v1
kind: ConfigMap

View File

@ -110,6 +110,9 @@ job_memory: "70Mi"
profile_browser_idle_seconds: 60
billing_enabled: false
sales_email: "sales@webrecorder.org"
# if set, print last 'log_failed_crawl_lines' of each failed
# crawl pod to backend operator stdout
# mostly intended for debugging / testing