Publishing to Vercel section

Closes #912
This commit is contained in:
Simon Willison 2020-07-31 10:06:32 -07:00 committed by GitHub
commit d71b0c0cb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,23 +15,6 @@ Once you have created a SQLite database (e.g. using `csvs-to-sqlite <https://git
You will need a hosting account with `Heroku <https://www.heroku.com/>`__ or `Google Cloud <https://cloud.google.com/>`__. Once you have created your account you will need to install and configure the ``heroku`` or ``gcloud`` command-line tools.
Publishing to Heroku
--------------------
To publish your data using Heroku, first create an account there and install and configure the `Heroku CLI tool <https://devcenter.heroku.com/articles/heroku-cli>`_.
You can publish a database to Heroku using the following command::
datasette publish heroku mydatabase.db
This will output some details about the new deployment, including a URL like this one::
https://limitless-reef-88278.herokuapp.com/ deployed to Heroku
You can specify a custom app name by passing ``-n my-app-name`` to the publish command. This will also allow you to overwrite an existing app.
.. literalinclude:: datasette-publish-heroku-help.txt
.. _publish_cloud_run:
Publishing to Google Cloud Run
@ -58,12 +41,43 @@ Cloud Run provides a URL on the ``.run.app`` domain, but you can also point your
.. literalinclude:: datasette-publish-cloudrun-help.txt
Publishing to Heroku
--------------------
To publish your data using [Heroku](https://heroku.com/), first create an account there and install and configure the `Heroku CLI tool <https://devcenter.heroku.com/articles/heroku-cli>`_.
You can publish a database to Heroku using the following command::
datasette publish heroku mydatabase.db
This will output some details about the new deployment, including a URL like this one::
https://limitless-reef-88278.herokuapp.com/ deployed to Heroku
You can specify a custom app name by passing ``-n my-app-name`` to the publish command. This will also allow you to overwrite an existing app.
.. literalinclude:: datasette-publish-heroku-help.txt
.. _publish_fly:
Publishing to Vercel
--------------------
`Vercel <https://vercel.com/>`__ - previously known as Zeit Now - provides a layer over AWS Lambda to allow for easy, scale-to-zero deployment. You can deploy Datasette instances to Vercel using the `datasette-publish-vercel <https://github.com/simonw/datasette-publish-vercel>`__ plugin.
::
pip install datasette-publish-vercel
datasette publish vercel mydatabase.db --project my-database-project
Not every feature is supported: consult the `datasette-publish-vercel README <https://github.com/simonw/datasette-publish-vercel/blob/master/README.md>`__ for more details.
.. _publish_fly:
Publishing to Fly
-----------------
`Fly <https://fly.io/>`__ is a `competitively priced <https://fly.io/docs/pricing/>`__ Docker-compatible hosting platform that makes it easy to run applications in globally distributed data centers close to your end users. You can deploy Datasette instances to Fly using the `datasette-publish-fly <https://github.com/simonw/datasette-publish-fly>`__ plugin, installed separately.
`Fly <https://fly.io/>`__ is a `competitively priced <https://fly.io/docs/pricing/>`__ Docker-compatible hosting platform that makes it easy to run applications in globally distributed data centers close to your end users. You can deploy Datasette instances to Fly using the `datasette-publish-fly <https://github.com/simonw/datasette-publish-fly>`__ plugin.
::