Trying to run two processes in a single Docker container on Cloud Run (Apache 2 and Datasette, to explore some reported bugs with mod_proxy) - urgh, this is so hard!

Found several recipes that work on my laptop but fail when I deploy them to Cloud Run github.com/simonw/dataset…
I'd love to figure this out because running two processes in the same container feels like a really useful trick to have in my pocket, but I may have to give up and run two separate containers instead - annoying when I'm just trying to provide a tiny interactive demo
I did get a new TIL out of this exercise - I figured out how to use the equivalent of "docker build --build-arg" with Google Cloud Build (you have to generate a cloudbuild.yml file and pass it to "gcloud builds submit --config") til.simonwillison.net/cloudrun/using…
Now wondering if the problem might be that Cloud Run restricts CPU between requests, which might be causing some havoc with my separate background process
Ended up deploying my demo to @flydotio instead - datasette-apache-proxy-demo.fly.dev/prefix/ is now live, demonstrating Datasette running behind an Apache 2 proxy (on port 80) that passes /prefix/ through to Datasette (private port 8001)

Dockerfile and fly.toml are here: github.com/simonw/dataset…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Simon Willison

Simon Willison Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @simonw

18 Nov
I've had a bit of a breakthrough with this over the past couple of years: maintaining detailed progress notes in a GitHub issues comment thread has dropped my "getting back on track" time down to a fraction of what it was
The reason it takes 25 minutes to spin back up again is that you're holding a ton of stuff exclusively on your own memory - so write it down!
Something I've realized is that 90% of software engineering is research, not typing code - figuring out what the code needs to do, which APIs to use, how best to test it etc

So all of that research goes in issue comments. Here's my best recent example: github.com/simonw/s3-cred…
Read 5 tweets
17 Nov
If I write a couple of KBs of data to the Biitcoin or Ethreum bloockchains that data still gets copied to every single active node, right?

Any estimates as to how much total disk space those 2KB take up worldwide?
Asking because evidently the idea of "storing data on the bloockchain" is a frequent point of confusion, I wonder if explaining how many copies that entails would help clarify things at all
In January 2021 there were an estimated 83,000 active full nodes, so presumably any data you write to the bloockchain gets duplicated 83,000 times? coindesk.com/tech/2021/01/2…
Read 5 tweets
17 Nov
One of the biggest productivity tricks I'm using in the Datasette ecosystem is continuous deployment of live demos - every time I push to Datasette (+ a few other repos) it deploys a demo of latest main - it's fantastic for both catching bugs and linking to from issue comments
I've been working on the datasette-graphql plugin today and the live demo at datasette-graphql-demo.datasette.io/graphql helped me catch a bug where JS files were loading in the wrong order, breaking things - a problem that didn't occur on my laptop
Here's the issue thread for that github.com/simonw/dataset…
Read 4 tweets
13 Nov
Datasette is four years old today! It's come a long way since that first release back in 2017 simonwillison.net/2017/Nov/13/da…
Progress on the project is pretty thoroughly documented by the datasette tag on my blog - 249 items and counting simonwillison.net/tags/datasette/
Something that really excites me about Datasette is that I can genuinely see myself still being thrilled to work on it ten years from now.

Projects like that are pretty rare - I feel very lucky to have found one that combines so many of my interests all in one package
Read 5 tweets
12 Nov
I presented a 90 minute workshop on Git scraping and how to explore the resulting data using @datasetteproj at #CodaBr21 (by @EscolaDeDados) today

Here are the exercises from the workshop, plus additional screenshots and notes that I added afterwards

docs.google.com/document/d/1TC…
@datasetteproj @EscolaDeDados To save attendees from having to get a working Python environment setup on their laptop, I instead encouraged them to use a free @gitpod account (gitpod.io) - I demonstrated each exercise in GitPod too

Cloud-based development environments are SO GOOD for tutorials
(I had planned to use GitHub Codespaces for this, but then realized that those are not freely available to non-paid users outside of the beta program yet)
Read 6 tweets
21 Aug
Here's a fun challenge: given an array of datetimes, what's the best way to plot those on a frequency graph over time?

They might all be on the same day, or they might be spread out over several years - so the challenge is automatically picking the most interesting bucket size An example of the kid of chart I want to produce
Looks like d3.bin().thresholds() is the answer I'm looking for observablehq.com/@d3/histogram
Yup, this works perfectly: observablehq.com/@simonw/my-twe… Histogram of my tweets over time, generated with the followi
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Thank you for your support!

Follow Us on Twitter!

:(