simonw / datasette

An open source multi-tool for exploring and publishing data
https://datasette.io
Apache License 2.0
9.09k stars 649 forks source link

Option to assign a domain/subdomain using `datasette publish cloudrun` #1604

Open simonw opened 2 years ago

simonw commented 2 years ago

Looks like this API should be able to do that: https://twitter.com/steren/status/1483835859191304192 - https://cloud.google.com/run/docs/reference/rest/v1/namespaces.domainmappings/create

simonw commented 2 years ago

Potential design:

datasette publish cloudrun data.db \
  --service my-service \
  --domain demo.datasette.io

I think I'm OK with calling this --domain even when it is being used with a subdomain.

This will require datasette.io to already have been verified with Google.

Not sure how best to handle the DNS part - maybe print out instructions for the necessary CNAME?