From 520c2c6a927d2fb3fb01bb0e3e91747d4d2d6453 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Tue, 5 Nov 2024 17:11:40 +0000 Subject: [PATCH] Fix up logging in the docker image --- Dockerfile | 3 +++ README.rst | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ef0267a..c0f7d9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,6 +44,9 @@ RUN groupadd --gid $APP_GID $APP_GROUP && \ --uid $APP_UID \ $APP_USER +# Don't buffer stdout and stderr as it breaks realtime logging +ENV PYTHONUNBUFFERED=1 + USER $APP_UID ENTRYPOINT ["tini", "--"] CMD ["os_capacity"] diff --git a/README.rst b/README.rst index 48a56d6..632b4ed 100644 --- a/README.rst +++ b/README.rst @@ -46,7 +46,7 @@ Or just run via docker or similar::: docker run -d --name os_capacity \ --mount type=bind,source=/etc/kolla/os-capacity/,target=/etc/openstack \ --env OS_CLOUD=openstack --env OS_CLIENT_CONFIG_FILE=/etc/openstack/clouds.yaml \ - -p 9000:9000 ghcr.io/stackhpc/os-capacity:e08ecb8 + -p 9000:9000 ghcr.io/stackhpc/os-capacity:master curl localhost:9000