simonw / big-local-datasette

Publishing a Datasette of open projects from biglocalnews.org
https://biglocal.datasettes.com/
2 stars 0 forks source link

Deploy first version to biglocal.datasettes.com with GitHub auth #3

Closed simonw closed 4 years ago

simonw commented 4 years ago

Deploy to Cloud Run. Use https://github.com/simonw/datasette-auth-github to lock down to members of http://github.com/biglocalnews org.

simonw commented 4 years ago

I created an OAuth app: https://github.com/settings/applications/1263558

datasette publish cloudrun biglocal.db \
    --service=biglocal \
    --install=datasette-auth-github \
    --plugin-secret datasette-auth-github client_id f4084e44a25d23ce1c99 \
    --plugin-secret datasette-auth-github client_secret 8a428d8092e6eac84d1eb6ada315a4e016b9e34f \
    --plugin-secret datasette-auth-github allow_org biglocalnews
simonw commented 4 years ago

I set up the DNS CNAME in CloudFlare for https://biglocal.datasettes.com/

simonw commented 4 years ago

Deploy failed:

2020-04-09 18:38:32.195 PDT Memory limit of 244M exceeded with 298M used. Consider increasing the memory limit, see https://cloud.google.com/run/docs/configuring/memory-limits

I ran it a second time (without bumping RAM) and it succeeded!

simonw commented 4 years ago

Maybe it didn't. Tried with --memory=2Gi

https://biglocal-j7hipcg4aq-uc.a.run.app/

simonw commented 4 years ago

It worked with the extra RAM! Need to wait for https://biglocal.datasettes.com/ to work so I can go through the GitHub auth bounce.

simonw commented 4 years ago

After 22 minutes the certificate hadn't deployed - maybe because of CloudFlare proxying? I switched CloudFlare to DNS only.

simonw commented 4 years ago

That fixed it and https://biglocal.datasettes.com/ works now.