From d71b0c0cb951e973d2d1d1a2540961f19aa9eb00 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Fri, 31 Jul 2020 10:06:32 -0700 Subject: [PATCH] Publishing to Vercel section Closes #912 --- docs/publish.rst | 50 +++++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/docs/publish.rst b/docs/publish.rst index 64868078..bd8d2622 100644 --- a/docs/publish.rst +++ b/docs/publish.rst @@ -15,23 +15,6 @@ Once you have created a SQLite database (e.g. using `csvs-to-sqlite `__ or `Google Cloud `__. 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 `_. - -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 `_. + +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 `__ - 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 `__ 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 `__ for more details. + .. _publish_fly: Publishing to Fly ----------------- -`Fly `__ is a `competitively priced `__ 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 `__ plugin, installed separately. +`Fly `__ is a `competitively priced `__ 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 `__ plugin. ::