Michael Czechowski edd3dee3d9
All checks were successful
Build and publish / build (pull_request) Successful in 19s
feat: bake default white-label nginx.conf into the image
The image used to ship just nginx + an entrypoint, with no routing
config — adapters had to mount their own nginx.conf via compose
`configs:` for anything to work. This broke the standalone
libreshop/demo preview (`curl /admin` returned 404).

Add a default nginx.conf.template that routes the standard libreshop
surface (`/admin`, `/uploads`, `/api`, `/`, ...) to
`${NGINX_UPSTREAM_CMS:-cms:5555}` / `${NGINX_UPSTREAM_SHOP:-shop:9999}`,
plus health and forwarded-headers handling. The entrypoint runs
envsubst at startup, then nginx.

Adapter override path is preserved: if compose `configs:` already
replaced /etc/nginx/nginx.conf with a non-stock file (detected via
the absence of the upstream nginx `worker_processes  auto;` line),
the entrypoint leaves it untouched.

Closes #1.
2026-04-29 19:20:43 +02:00

libreshop/nginx

Reverse-proxy template fronting libreshop adapters.

Part of the libreshop toolkit. Image published at git.librete.ch/libreshop/nginx on every push to main and on v* tags.

Source

This repo was extracted from mp/nginx/ on 2026-04-29; mp was the first concrete adapter consuming the toolkit. mp's compose.yml now pulls git.librete.ch/libreshop/nginx:<pin> instead of building locally.

Build locally

docker build -t libreshop/nginx:dev .

Adapter contract

See docker-entrypoint.sh and Dockerfile for the runtime surface. Adapters configure the component via env vars and bind-mounted volumes; do not patch the running container or rely on internal paths.

Description
libreshop/nginx — Reverse-proxy template fronting libreshop adapters
Readme 46 KiB
Languages
Shell 77.7%
Dockerfile 22.3%