From 281eff0f14bbc6bca167ee996a36fa0ac8b8db55 Mon Sep 17 00:00:00 2001 From: Daniel Luiz Alves Date: Tue, 17 Jun 2025 23:23:36 -0300 Subject: [PATCH] chore: update Dockerfile and supervisord configuration for improved logging - Modified the Dockerfile to streamline the creation of the supervisor configuration directory. - Updated `infra/supervisord.conf` to redirect logs to stdout and stderr, enhancing log management and visibility. - Removed specific log file paths and sizes to simplify logging setup. --- Dockerfile | 2 +- infra/supervisord.conf | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index bba75f3..9636427 100644 --- a/Dockerfile +++ b/Dockerfile @@ -115,7 +115,7 @@ COPY --from=web-builder --chown=palmr:nodejs /app/web/.next/static ./.next/stati WORKDIR /app # Create supervisor configuration -RUN mkdir -p /etc/supervisor/conf.d /var/log/supervisor +RUN mkdir -p /etc/supervisor/conf.d # Copy server start script COPY infra/server-start.sh /app/server-start.sh diff --git a/infra/supervisord.conf b/infra/supervisord.conf index 6294274..9412656 100644 --- a/infra/supervisord.conf +++ b/infra/supervisord.conf @@ -1,8 +1,10 @@ [supervisord] nodaemon=true user=root -logfile=/var/log/supervisor/supervisord.log +logfile=/dev/stdout +logfile_maxbytes=0 pidfile=/var/run/supervisord.pid +loglevel=info [program:server] command=/bin/sh -c "export DATABASE_URL='file:/app/server/prisma/palmr.db' && export UPLOAD_PATH='/app/server/uploads' && export TEMP_CHUNKS_PATH='/app/server/temp-chunks' && /app/server-start.sh" @@ -10,8 +12,10 @@ directory=/app/palmr-app user=root autostart=true autorestart=true -stderr_logfile=/var/log/supervisor/server.err.log -stdout_logfile=/var/log/supervisor/server.out.log +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 environment=PORT=3333,HOME="/home/palmr" priority=100 @@ -21,8 +25,10 @@ directory=/app/web user=palmr autostart=true autorestart=true -stderr_logfile=/var/log/supervisor/web.err.log -stdout_logfile=/var/log/supervisor/web.out.log +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 environment=PORT=5487,HOSTNAME="0.0.0.0",HOME="/home/palmr",API_BASE_URL="http://127.0.0.1:3333" priority=200 startsecs=10 \ No newline at end of file