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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
nginx.conf.templatewith full routing: admin/CMS surfaces →cms:5555, uploads →cms:5555(cached),/api→shop:9999(no cache),/→shop:9999(cached)docker-entrypoint.shto render template viaenvsubstat startup; skip if adapter has already mounted its own configDockerfiletoCOPY nginx.conf.templateinto imageTest plan
docker build -t libreshop/nginx:test libreshop/nginx//etc/nginx/nginx.confcontainscms:5555andshop:9999NGINX_UPSTREAM_SHOP=shop:8080→ confirm substitutionnginx.confvia composeconfigs:→ confirm "adapter-provided nginx.conf detected" log linenginx:v0.1.1→ confirm/adminreturns 200Closes #1
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.