Commit Graph

7 Commits

Author SHA1 Message Date
Klaas van Schelven
ab7ad72376 Default worker-count in Docker: min(cpu_count, 4) instead of 1
As per discussion with @sekrause on #101

Briefly: recent reduction is a good idea, but 1 is probably too
little.
2025-05-18 11:18:54 +02:00
Klaas van Schelven
7f2e4b786b Default worker-count in Docker: 1 instead of 10
My reasoning is twofold:

1. a count of 1 is actually probably "enough for many setups" because ingestion
   is very fast anyway (just store the file); while the lower memory-footprint
   that comes with having fewer workers means that adoption of Bugsink will be
   easier.

2. tuning the variable is going to be less annoying if there's no default that
   might override "in the wrong direction" (i.e. the interaction between
   `WEB_CONCURRENCY` and `GUNICORN_CMD_ARGS`)

See #101 (where the concept of customizability was discussed, though not the
present idea of chaning the default).
2025-05-18 09:15:43 +02:00
Klaas van Schelven
ef630ded50 Make number of Gunicorn workers configurable in Docker setup
Fix #101

It becomes configurable by passing an environment-var someting like so
to your `docker run` (or equivalent).

GUNICORN_CMD_ARGS="--workers=123"
2025-05-17 22:17:28 +02:00
Klaas van Schelven
232d2d969d Add HEALTHCHECK command to Dockerfile*
See #98
2025-05-15 16:38:48 +02:00
Klaas van Schelven
be2b5df725 Add working-dir based Dockerfile
Many thanks to @anime-shed's input!
Closes #68
2025-04-04 17:32:01 +02:00
Klaas van Schelven
c2839b7540 Dockerfile.fromwheel: reorder for build-time efficiency
In particular:

* Move building of mysqlclient (expensive, mostly unchanging) up
* Move handling of WHEEL_FILE down (always changing for invocations)

The advantages are most clear when running buildx.

This was prompted by discussions on #68, when I tried to explain my
reasoning for the current way things were working (building wheels,
and then copying them over) but I couldn't really justify that, so
I got rid of it instead. (detail: I noticed that psycopg[binary] did
not follow this pattern, which made me question it more broadly)
2025-04-04 15:53:36 +02:00
Klaas van Schelven
786a97aaa0 Rename Dockerfile to Dockerfile.fromwheel
See #68 for discussion (which is summarized at the top of the Dockerfile)
2025-04-04 11:41:45 +02:00