mbox series

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

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

Message

Tim Orling Nov. 15, 2026, 7:17 p.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.

This series is based on "docker-compose: run layersapp with an init
process", sent separately, which isn't an RFC.

Changes in v2:
- 2: layersapp runs with "init: true", as in the other compose files
  after the patch above, and the compose file test covers
  docker-compose.nginx-proxy.yml too.

Tested: the test suite passes in the image; 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 | 93 ++++++++++++++++++++++++++++++++++
 tests/test_dockersetup.py      |  3 +-
 5 files changed, 124 insertions(+), 6 deletions(-)
 create mode 100644 .env.prod.proxy
 create mode 100644 docker-compose.nginx-proxy.yml


base-commit: 08e58cdece30019a6f9e5d14af16ebe20afa6177
prerequisite-patch-id: 4ad6ed99d0c42ce111a25d4731d953218337e7cc