feat: bake default white-label nginx.conf into the image
All checks were successful
Build and publish / build (pull_request) Successful in 19s
All checks were successful
Build and publish / build (pull_request) Successful in 19s
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.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
# Libre Shop - (Reverse) Proxy
|
||||
# Version 1.0.0
|
||||
# libreshop/nginx — reverse proxy fronting libreshop adapters.
|
||||
|
||||
FROM nginx:1.26.2
|
||||
|
||||
# White-label default config rendered at startup via envsubst.
|
||||
# Adapters override the whole nginx.conf via compose `configs:`.
|
||||
COPY nginx.conf.template /etc/nginx/nginx.conf.template
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user