fix(nginx): move template outside sites-enabled to avoid nginx loading it raw
This commit is contained in:
parent
d278ad5f98
commit
c73bb71de7
1 changed files with 3 additions and 3 deletions
|
|
@ -42,8 +42,8 @@ COPY document-parser/ .
|
||||||
# Frontend static files
|
# Frontend static files
|
||||||
COPY --from=frontend-build /build/dist /usr/share/nginx/html
|
COPY --from=frontend-build /build/dist /usr/share/nginx/html
|
||||||
|
|
||||||
# Nginx config (template — substituted at container start via envsubst)
|
# Nginx config (template stored outside sites-enabled to avoid nginx loading it raw)
|
||||||
COPY nginx.conf.template /etc/nginx/sites-enabled/default.template
|
COPY nginx.conf.template /etc/nginx/default.template
|
||||||
|
|
||||||
# Non-root user
|
# Non-root user
|
||||||
RUN useradd --create-home --shell /bin/bash appuser
|
RUN useradd --create-home --shell /bin/bash appuser
|
||||||
|
|
@ -57,7 +57,7 @@ ENV NGINX_MAX_BODY_SIZE=200M
|
||||||
|
|
||||||
EXPOSE 3000
|
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 ---
|
# --- Remote: lightweight, delegates to Docling Serve ---
|
||||||
FROM base AS remote
|
FROM base AS remote
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue