Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Python buffering of standard output/error streams #438

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,9 @@ RUN /root/services/ui_backend_service/download_ui.sh
ADD services/migration_service /root/services/migration_service
RUN pip3 install -r /root/services/migration_service/requirements.txt

# The program uses `print` to log messages, so disable buffering to output the messages as soon as
# they are written.
ENV PYTHONUNBUFFERED=1

RUN chmod 777 /root/services/migration_service/run_script.py
CMD python3 services/migration_service/run_script.py
7 changes: 6 additions & 1 deletion Dockerfile.metadata_service
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@ ADD services/metadata_service /root/services/metadata_service
ADD setup.py setup.cfg /root/
WORKDIR /root
RUN pip install --editable .
CMD metadata_service

# The program uses `print` to log messages, so disable buffering to output the messages as soon as
# they are written.
ENV PYTHONUNBUFFERED=1

CMD metadata_service
7 changes: 6 additions & 1 deletion Dockerfile.migration_service
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ ADD services/migration_service /root/services/migration_service
ADD setup.py setup.cfg run_goose.py /root/
WORKDIR /root
RUN pip install --editable .
CMD migration_service

# The program uses `print` to log messages, so disable buffering to output the messages as soon as
# they are written.
ENV PYTHONUNBUFFERED=1

CMD migration_service
4 changes: 4 additions & 0 deletions Dockerfile.ui_service
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ RUN /root/services/ui_backend_service/download_ui.sh

RUN pip install --editable .

# The program uses `print` to log messages, so disable buffering to output the messages as soon as
# they are written.
ENV PYTHONUNBUFFERED=1

CMD ui_backend_service