mirror of
https://github.com/imjasonh/terraform-playground
synced 2026-07-22 16:11:22 +00:00
cf-worker-container
Signed-off-by: Jason Hall <jason@chainguard.dev>
This commit is contained in:
parent
51ee9aa0ec
commit
9ba46672ce
10 changed files with 965 additions and 0 deletions
16
cf-worker-container/README.md
Normal file
16
cf-worker-container/README.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Cloudflare Workers Containers
|
||||
|
||||
This is an experiment using Cloudflare Workers Containers to host a Go application on Workers.
|
||||
|
||||
Findings:
|
||||
|
||||
- You can't just write Go, you also need to write a simple [`index.js`](./index.js) that handles the Worker request and forwards it to the Container durable object
|
||||
- On the plus side, that also means it can forward to _multiple_ containers, which could be interesting
|
||||
- You can't just give it a pre-built image; Cloudflare wants to either build it from a `Dockerfile` and your source, or a _publicly pullable_ image
|
||||
- Because Cloudflare wants to do the build, you can't even just do `FROM <ko-built-image>` if that image is private :sob:
|
||||
- R2 integration is very DIY; regular Workers have a nice clean API for R2 access, but Containers need to be passed regular API creds via env
|
||||
- Monitoring and observability of Containers seem pretty limited
|
||||
- The Worker wrapper logs are available, and the Container logs are available via DO, but Container startup logs seem to go into a black hole, which is frustrating when you're debugging startup issues
|
||||
- I couldn't see any Terraform support, only declarative `wrangler deploy`
|
||||
|
||||
Due to these limitations, I don't see a lot of upside to using CF Containers over something like Cloud Run, even if it might cost a bit more. :shrug:
|
||||
Loading…
Add table
Add a link
Reference in a new issue