16 Commits

Author SHA1 Message Date
Erwin Oegema
3acd93856d Always migrate snappea database
(cherry picked from commit 3c51122746db5b348ab95f289cef4efa9500d358)

See #244
2025-11-07 20:34:32 +01:00
Klaas van Schelven
e346f8d5c2 Fix useradd in Dockerfile*
exposed while trying to release 2.0.0
2025-09-16 10:55:29 +02:00
Klaas van Schelven
25b7f7c0bc Merge pull request #178 from bugsink/non-root-docker
non-root Docker
2025-09-02 13:01:21 +02:00
Klaas van Schelven
044270aa6e Upgrade inotify_simple to 2.0
mainly: available as a .whl now

See https://github.com/chrisjbillington/inotify_simple/issues/41
2025-08-25 08:55:50 +02:00
Klaas van Schelven
42ba5a71fa Docker: bugsink-show-version on-start 2025-08-02 21:25:33 +02:00
Klaas van Schelven
488d0190bb Docker: use a fixed UID (14237) for the bugsink user
* Rebuilding the image will not accidentally assign a different UID to `bugsink`
  this would be "extremely annoying" in the context of bind-mounts and volumes.
* Ensures predictable ownership for bind-mounts and Docker volumes at build time.
* Avoids collisions with existing host accounts

Considerations for 14237:

* well below the 65535 limit, keeping it compatible with default subuid/subgid mappings.
* Positioned above 1000 to steer clear of standard system and regular user ranges.
* Not so large that older filesystems or tooling (e.g., simple NFS exports) might have issues.

See #176
2025-07-31 11:08:15 +02:00
Klaas van Schelven
48cf7e8e90 Docker.fromwheel: more completely _from wheel_
Before this commit, the COPY command was still used to copy-over 2 files from
the working dir. Alhtough this was probably fine in practice (docker build
typically happens from a checked out state that matches the wheel you're
docker-building) it's not what's on the tin ("from wheel") and it opens up
the possiblity of subtle bugs (file mismatches when building from a different
state). Better prevent those.
2025-07-30 22:33:10 +02:00
Klaas van Schelven
53753bc904 non-root docker: create bugsink-owned /data dir
without it, won't even build (/data creation happened during build
b/c migrations triggered it when the settings were loaded)

See #176
2025-07-30 17:09:25 +02:00
Klaas van Schelven
7905542474 Run Docker gunicorn as non-root (bugsink) user
WIP; does not anser the question of /data/ ownership

See #176
2025-07-30 16:52:58 +02:00
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