Default config doesn't proxy /admin to the CMS #1

Closed
opened 2026-04-29 19:02:27 +02:00 by libretech · 0 comments
Owner

Summary

The default docker-entrypoint.sh + nginx config served by the libreshop/nginx image only routes / (and /api/* per the upstream defaults) to the shop frontend. /admin returns 404, so the Strapi admin UI is unreachable when the libreshop toolkit runs in standalone (white-label) mode.

Reproduce

git clone https://git.librete.ch/libreshop/demo
cd demo
cp .env.example .env
docker compose up -d
sleep 90  # wait for cms init
curl -o /dev/null -w '/ %{http_code}\n'      http://localhost:8080/
curl -o /dev/null -w '/admin %{http_code}\n' http://localhost:8080/admin

Observed:

/ 200
/admin 404

Tasks

  • Add an /admin location block (and probably /_health, /upload/* for assets) to the libreshop nginx config that proxies to http://cms:5555.
  • Decide if these routes are always-on or guarded by an env flag (LIBRESHOP_NGINX_ADMIN_ENABLED?). Adapters that hide the admin behind a separate vhost (e.g. mp's nginx fronting muellerprints-paperwork.com) shouldn't have it leak.
  • Update the libreshop/demo README.md Quick start to mention how to reach the CMS admin once this lands.

Acceptance criteria

  • curl http://localhost:8080/admin returns a 200/302 (Strapi admin index) on a fresh docker compose up -d run of libreshop/demo.
  • mp's deployment continues to NOT expose admin on muellerprints-paperwork.com if the env flag stays off there.
  • libreshop/cms white-label refactor (separate issue) — admin reachability is a precondition for end-users to provision their own brand content.
## Summary The default `docker-entrypoint.sh` + nginx config served by the libreshop/nginx image only routes `/` (and `/api/*` per the upstream defaults) to the shop frontend. `/admin` returns 404, so the Strapi admin UI is unreachable when the libreshop toolkit runs in standalone (white-label) mode. ## Reproduce ```sh git clone https://git.librete.ch/libreshop/demo cd demo cp .env.example .env docker compose up -d sleep 90 # wait for cms init curl -o /dev/null -w '/ %{http_code}\n' http://localhost:8080/ curl -o /dev/null -w '/admin %{http_code}\n' http://localhost:8080/admin ``` Observed: ``` / 200 /admin 404 ``` ## Tasks - [ ] Add an `/admin` location block (and probably `/_health`, `/upload/*` for assets) to the libreshop nginx config that proxies to `http://cms:5555`. - [ ] Decide if these routes are always-on or guarded by an env flag (`LIBRESHOP_NGINX_ADMIN_ENABLED`?). Adapters that hide the admin behind a separate vhost (e.g. mp's nginx fronting muellerprints-paperwork.com) shouldn't have it leak. - [ ] Update the libreshop/demo `README.md` Quick start to mention how to reach the CMS admin once this lands. ## Acceptance criteria - `curl http://localhost:8080/admin` returns a 200/302 (Strapi admin index) on a fresh `docker compose up -d` run of `libreshop/demo`. - mp's deployment continues to NOT expose admin on `muellerprints-paperwork.com` if the env flag stays off there. ## Related - libreshop/cms white-label refactor (separate issue) — admin reachability is a precondition for end-users to provision their own brand content.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: libreshop/nginx#1
No description provided.