Skip to content

Commit 3d32bef

Browse files
committed
fix(ingress): enable unbuffered Python output for real-time logging
Python stdout is fully buffered when not connected to a terminal (e.g. in Docker containers). This causes log output to be delayed and appear in batches, making it hard to diagnose timing issues. Set PYTHONUNBUFFERED=1 so print() output appears immediately in container logs.
1 parent d1c1539 commit 3d32bef

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

custom-domain/dstack-ingress/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ RUN --mount=type=bind,source=scripts,target=/tmp/scripts,ro \
5858

5959
ENV PATH="/scripts:$PATH"
6060
ENV PYTHONPATH="/scripts"
61+
ENV PYTHONUNBUFFERED=1
6162
COPY --chmod=666 .GIT_REV /etc/
6263

6364
ENTRYPOINT ["/scripts/entrypoint.sh"]

0 commit comments

Comments
 (0)