File: README.md

package info (click to toggle)
datasette 0.65.2-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 4,260 kB
  • sloc: python: 28,661; javascript: 10,089; sh: 71; makefile: 47; ansic: 26
file content (38 lines) | stat: -rw-r--r-- 1,387 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Datasette running behind an Apache proxy

See also [Running Datasette behind a proxy](https://docs.datasette.io/en/latest/deploying.html#running-datasette-behind-a-proxy)

This live demo is running at https://datasette-apache-proxy-demo.fly.dev/prefix/

To build locally, passing in a Datasette commit hash (or `main` for the main branch):

    docker build -t datasette-apache-proxy-demo . \
      --build-arg DATASETTE_REF=c617e1769ea27e045b0f2907ef49a9a1244e577d

Then run it like this:

    docker run -p 5000:80 datasette-apache-proxy-demo

And visit `http://localhost:5000/` or `http://localhost:5000/prefix/`

## Deployment to Fly

To deploy to [Fly](https://fly.io/) first create an application there by running:

    flyctl apps create --name datasette-apache-proxy-demo

You will need a different name, since I have already taken that one.

Then run this command to deploy:

    flyctl deploy --build-arg DATASETTE_REF=main

This uses `fly.toml` in this directory, which hard-codes the `datasette-apache-proxy-demo` name - so you would need to edit that file to match your application name before running this.

## Deployment to Cloud Run

Deployments to Cloud Run currently result in intermittent 503 errors and I'm not sure why, see [issue #1522](https://github.com/simonw/datasette/issues/1522).

You can deploy like this:

    DATASETTE_REF=main ./deploy-to-cloud-run.sh