html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,issue,performed_via_github_app
https://github.com/simonw/datasette/issues/1522#issuecomment-974542348,https://api.github.com/repos/simonw/datasette/issues/1522,974542348,IC_kwDOBm6k_c46FlYM,9599,2021-11-19T23:41:47Z,2021-11-19T23:44:07Z,OWNER,Do I have to use `cloudbuild.yml` to specify these? https://stackoverflow.com/a/58327340/6083 and https://stackoverflow.com/a/66232670/6083 suggest I do.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",1058896236,
https://github.com/simonw/datasette/issues/1522#issuecomment-974541971,https://api.github.com/repos/simonw/datasette/issues/1522,974541971,IC_kwDOBm6k_c46FlST,9599,2021-11-19T23:40:32Z,2021-11-19T23:40:32Z,OWNER,"I want to be able to use build arguments to specify which commit version or branch of Datasette to deploy.
This is proving hard to work out. I have this in my Dockerfile now:
```
ARG DATASETTE_REF
RUN pip install https://github.com/simonw/datasette/archive/${DATASETTE_REF}.zip
```
Which works locally:
docker build -t datasette-apache-proxy-demo . \
--build-arg DATASETTE_REF=c617e1769ea27e045b0f2907ef49a9a1244e577d
But I can't figure out the right incantation to pass to `gcloud build submit`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",1058896236,
https://github.com/simonw/datasette/issues/1522#issuecomment-974523569,https://api.github.com/repos/simonw/datasette/issues/1522,974523569,IC_kwDOBm6k_c46Fgyx,9599,2021-11-19T22:51:10Z,2021-11-19T22:51:10Z,OWNER,I wan a GitHub Action which I can manually activate to deploy a new version of that demo... and I want it to bake in the latest release of Datasette so I can use it to demonstrate bug fixes.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",1058896236,
https://github.com/simonw/datasette/issues/1522#issuecomment-974523297,https://api.github.com/repos/simonw/datasette/issues/1522,974523297,IC_kwDOBm6k_c46Fguh,9599,2021-11-19T22:50:31Z,2021-11-19T22:50:31Z,OWNER,Demo code is now at: https://github.com/simonw/datasette/tree/main/demos/apache-proxy,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",1058896236,
https://github.com/simonw/datasette/issues/1522#issuecomment-974521687,https://api.github.com/repos/simonw/datasette/issues/1522,974521687,IC_kwDOBm6k_c46FgVX,9599,2021-11-19T22:46:26Z,2021-11-19T22:46:26Z,OWNER,"Oh weird, it started working: https://datasette-apache-proxy-demo-j7hipcg4aq-uc.a.run.app/prefix/fixtures/sortable","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",1058896236,
https://github.com/simonw/datasette/issues/1522#issuecomment-974506401,https://api.github.com/repos/simonw/datasette/issues/1522,974506401,IC_kwDOBm6k_c46Fcmh,9599,2021-11-19T22:11:51Z,2021-11-19T22:11:51Z,OWNER,"This is frustrating: I have the following Dockerfile:
```dockerfile
FROM python:3-alpine
RUN apk add --no-cache \
apache2 \
apache2-proxy \
bash
RUN pip install datasette
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static /tini
RUN chmod +x /tini
# Append this to the end of the default httpd.conf file
RUN echo $'ServerName localhost\n\
\n\
\n\
Order deny,allow\n\
Allow from all\n\
\n\
\n\
ProxyPass /prefix/ http://localhost:8001/\n\
Header add X-Proxied-By ""Apache2""' >> /etc/apache2/httpd.conf
RUN echo $'Datasette' > /var/www/localhost/htdocs/index.html
WORKDIR /app
ADD https://latest.datasette.io/fixtures.db /app/fixtures.db
RUN echo $'#!/usr/bin/env bash\n\
set -e\n\
\n\
httpd -D FOREGROUND &\n\
datasette fixtures.db --setting base_url ""/prefix/"" -h 0.0.0.0 -p 8001 &\n\
\n\
wait -n' > /app/start.sh
RUN chmod +x /app/start.sh
EXPOSE 80
ENTRYPOINT [""/tini"", ""--"", ""/app/start.sh""]
```
It works fine when I run it locally:
```
docker build -t datasette-apache-proxy-demo .
docker run -p 5000:80 datasette-apache-proxy-demo
```
But when I deploy it to Cloud Run with the following script:
```bash
#!/bin/bash
# https://til.simonwillison.net/cloudrun/ship-dockerfile-to-cloud-run
NAME=""datasette-apache-proxy-demo""
PROJECT=$(gcloud config get-value project)
IMAGE=""gcr.io/$PROJECT/$NAME""
gcloud builds submit --tag $IMAGE
gcloud run deploy \
--allow-unauthenticated \
--platform=managed \
--image $IMAGE $NAME \
--port 80
```
It serves the `/` page successfully, but hits to `/prefix/` return the following 503 error:
> Service Unavailable
>
> The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
>
> Apache/2.4.51 (Unix) Server at datasette-apache-proxy-demo-j7hipcg4aq-uc.a.run.app Port 80
Cloud Run logs:
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",1058896236,
https://github.com/simonw/datasette/issues/1522#issuecomment-974435661,https://api.github.com/repos/simonw/datasette/issues/1522,974435661,IC_kwDOBm6k_c46FLVN,9599,2021-11-19T20:33:42Z,2021-11-19T20:33:42Z,OWNER,"Should just be a case of deploying this `Dockerfile`:
```Dockerfile
FROM python:3-alpine
RUN apk add --no-cache \
apache2 \
apache2-proxy \
bash
RUN pip install datasette
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static /tini
RUN chmod +x /tini
# Append this to the end of the default httpd.conf file
RUN echo $'ServerName localhost\n\
\n\
\n\
Order deny,allow\n\
Allow from all\n\
\n\
\n\
ProxyPass /foo/bar/ http://localhost:9000/\n\
Header add X-Proxied-By ""Apache2""' >> /etc/apache2/httpd.conf
RUN echo $'Datasette' > /var/www/localhost/htdocs/index.html
WORKDIR /app
ADD https://latest.datasette.io/fixtures.db /app/fixtures.db
RUN echo $'#!/usr/bin/env bash\n\
set -e\n\
\n\
httpd -D FOREGROUND &\n\
datasette fixtures.db --setting base_url ""/foo/bar/"" -p 9000 &\n\
\n\
wait -n' > /app/start.sh
RUN chmod +x /app/start.sh
EXPOSE 80
ENTRYPOINT [""/tini"", ""--"", ""/app/start.sh""]
```
I can follow this TIL: https://til.simonwillison.net/cloudrun/ship-dockerfile-to-cloud-run","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",1058896236,