From 2807cc3aea0720bd103271fa89fecf9ab7712c10 Mon Sep 17 00:00:00 2001 From: Pier-Jean Malandrino Date: Thu, 30 Apr 2026 12:09:32 +0200 Subject: [PATCH] fix(nginx): move template outside sites-enabled to avoid nginx loading it raw --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5190af8..fdb387b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,8 +42,8 @@ COPY document-parser/ . # Frontend static files COPY --from=frontend-build /build/dist /usr/share/nginx/html -# Nginx config (template — substituted at container start via envsubst) -COPY nginx.conf.template /etc/nginx/sites-enabled/default.template +# Nginx config (template stored outside sites-enabled to avoid nginx loading it raw) +COPY nginx.conf.template /etc/nginx/default.template # Non-root user RUN useradd --create-home --shell /bin/bash appuser @@ -57,7 +57,7 @@ ENV NGINX_MAX_BODY_SIZE=200M EXPOSE 3000 -CMD ["sh", "-c", "envsubst '${NGINX_MAX_BODY_SIZE}' < /etc/nginx/sites-enabled/default.template > /etc/nginx/sites-enabled/default && nginx && exec su appuser -c 'uvicorn main:app --host 127.0.0.1 --port 8000'"] +CMD ["sh", "-c", "envsubst '${NGINX_MAX_BODY_SIZE}' < /etc/nginx/default.template > /etc/nginx/sites-enabled/default && nginx && exec su appuser -c 'uvicorn main:app --host 127.0.0.1 --port 8000'"] # --- Remote: lightweight, delegates to Docling Serve --- FROM base AS remote