Benoit Chesneau 54d38afddf test: unblock docker fixtures on macOS hosts
- per_app_allocation: move host port from 8001 to 28001. OrbStack reserves
  8001 on macOS for vcom-tunnel which makes 'Bind: port already allocated'
  the default failure mode.
- dirty_ttin_ttou: pin BASE_URL to 127.0.0.1 instead of 'localhost'. macOS
  resolves 'localhost' to ::1 first; Docker Desktop / OrbStack only forward
  host ports on IPv4 so the IPv6 attempt resets and the test fixture treats
  the service as unhealthy.
- dirty_ttin_ttou: add setproctitle to the test image. The TTIN/TTOU tests
  count workers via 'pgrep -f dirty-worker', which only matches once
  gunicorn's util._setproctitle has actually renamed the processes.
2026-05-04 09:47:38 +02:00

20 lines
594 B
Docker

FROM python:3.14-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
curl procps \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install gunicorn from source. setproctitle is required so dirty-arbiter
# and dirty-worker processes get distinguishable names that the tests use
# to count workers via pgrep.
COPY . /gunicorn-src/
RUN pip install --no-cache-dir /gunicorn-src/ setproctitle
# Copy test app
COPY tests/docker/dirty_ttin_ttou/app.py /app/
COPY tests/docker/dirty_ttin_ttou/gunicorn_conf.py /app/
CMD ["gunicorn", "-c", "gunicorn_conf.py", "app:app"]