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.
12 lines
383 B
Docker
12 lines
383 B
Docker
# 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
|
|
|
|
CMD ["/docker-entrypoint.sh"]
|