mbox series

[layerindex-web,RFC,0/2] uWSGI, and a docker-compose setup with nginx-proxy

Message ID 20261114005006.28193-1-tim.orling@konsulko.com
Headers show
Series uWSGI, and a docker-compose setup with nginx-proxy | expand

Message

Tim Orling Nov. 14, 2026, 12:50 a.m. UTC
This is an RFC: I run the layer index test instance I use for these
patches this way, and would like to know if this is useful upstream,
and in particular whether the production site would use it.

1: Serves the application with uWSGI instead of gunicorn. uWSGI speaks
   HTTP, so the existing nginx configurations are unchanged. It also
   serves the static files, now collected into the image at build time.
2: Adds docker-compose.nginx-proxy.yml, with nginx-proxy and
   acme-companion in place of the layersweb (nginx) and layerscertbot
   containers: the certificate is obtained and renewed automatically,
   with no hand-edited nginx configuration. The existing compose files
   are unchanged.

Patch 1 can be taken on its own; patch 2 needs it for the static
files.

Tested: the test suite passes in the image (75 passed, 1 skipped);
uWSGI starts, serves static files and stops cleanly on SIGTERM; and
the nginx-proxy setup serves pages and static files over HTTP locally.
The test instance has run uWSGI behind nginx-proxy, with Let's
Encrypt, since October.

Open questions:
- Should uWSGI replace gunicorn, or be an option?
- dockersetup.py does not know about the nginx-proxy setup; should it?
- The test instance also waits for the database and runs migrate and
  collectstatic when the container starts, instead of in
  dockersetup.py. I left that out; is it wanted?

Tim Orling (2):
  Dockerfile: serve the application with uWSGI
  docker-compose.nginx-proxy.yml: add a production setup using
    nginx-proxy

 .env.prod.proxy                |  7 +++
 Dockerfile                     | 15 ++++--
 README.md                      | 12 +++++
 docker-compose.nginx-proxy.yml | 90 ++++++++++++++++++++++++++++++++++
 4 files changed, 119 insertions(+), 5 deletions(-)
 create mode 100644 .env.prod.proxy
 create mode 100644 docker-compose.nginx-proxy.yml


base-commit: 08e58cdece30019a6f9e5d14af16ebe20afa6177