feat(infra): configure imgproxy to use next.js rewrite proxy

- Added /_img/ rewrite rule in next.config.mjs to proxy image requests to IMGPROXY_URL
- Updated lib/imgproxy.ts to use local /_img path instead of exposed public URL
- Replaced NEXT_PUBLIC_IMGPROXY_URL (build-time) with IMGPROXY_URL (runtime)
- Updated Dockerfile and docker-compose.yml to strip unused build args
This commit is contained in:
2026-02-18 15:57:44 +01:00
parent 38cf6a8d75
commit 95d0d094e1
6 changed files with 25 additions and 11 deletions

View File

@@ -57,9 +57,9 @@ SENTRY_DSN=
IMAGE_TAG=latest
TRAEFIK_HOST=klz-cables.com
ENV_FILE=.env
# IMGPROXY_URL_MAPPING is used to map public domains to internal Docker hostnames
# Example for testing: https://testing.klz-cables.com/:http://klz-app:3000/,https://cms.testing.klz-cables.com/:http://klz-cms:8055/
IMGPROXY_URL_MAPPING=
# IMGPROXY_URL: The backend URL of the imgproxy instance (e.g. img.infra.mintel.me)
# Next.js will proxy requests from /_img to this URL.
IMGPROXY_URL=https://img.infra.mintel.me
# ────────────────────────────────────────────────────────────────────────────
# Varnish Configuration