jamesread / prometheus-gmail-exporter

Checks gmail labels for unread messages and exposes the counts via prometheus.
Apache License 2.0
47 stars 9 forks source link

Document how to run container on headless server or some cloud infra #9

Closed vorburger closed 1 year ago

vorburger commented 1 year ago

As alluded to in #3, quote: I'm however not really running this in Podman/Docker on a Desktop like Fedora Workstation with -v ~/.prometheus-gmail-exporter/:/root/.prometheus-gmail-exporter/, but starting the container "headlessly", using Google Cloud Run.

The auth story and current doc doesn't really "just work" like this - the goal of this issue is to document how to run container on headless server or some cloud infra in the README.

It's not really clear to me yet how this relates to the (quote #8) port of the python version to do "online auth", rather than the "offline auth" ... @jamesread would that help for this deployment model?

The principle is probably applicable to both the Python version (master branch right now) and the Golang port branch.

jamesread commented 1 year ago

The "online auth", means that the OAuth flow needs to be able to post back to the python script, running as a daemon in Google Cloud Run. If that's possible, then the "online auth" should work.

I've always run this in a container, so I preferred "offline auth" (where you copy and paste a code at startup), as those containers often didn't have inbound access for the OAuth flow.

jamesread commented 1 year ago

Closed due to #18 documenting this.