From cdb07301aa67f8dfa3a5e39605c88634c7ef344a Mon Sep 17 00:00:00 2001 From: Cameron Pfiffer Date: Thu, 5 Feb 2026 11:39:35 -0800 Subject: [PATCH] fix(indexer): Add PYTHONUNBUFFERED and better gunicorn logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The container was starting but logs weren't showing errors. Added: - PYTHONUNBUFFERED=1 to ensure output is visible - --access-logfile - and --error-logfile - to gunicorn for Railway logging This makes it easier to debug Railway deployment issues. 🐛 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta --- indexer/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/indexer/Dockerfile b/indexer/Dockerfile index bff6ea0..6e88da2 100644 --- a/indexer/Dockerfile +++ b/indexer/Dockerfile @@ -16,8 +16,9 @@ COPY lexicons/ ./lexicons/ # Install Python dependencies RUN pip install --no-cache-dir . -# Print a startup message -RUN echo 'echo "Hello from comind!"' > /startup.sh && chmod +x /startup.sh +# Ensure output is unbuffered for logging +ENV PYTHONUNBUFFERED=1 # Default to running the web server - use PORT env var for Railway -CMD sh -c "/startup.sh && gunicorn --bind 0.0.0.0:\${PORT:-8080} --workers 2 --timeout 120 indexer.app:app" +CMD echo "Starting comind indexer on port ${PORT:-8080}..." && \ + gunicorn --bind 0.0.0.0:${PORT:-8080} --workers 2 --timeout 120 --access-logfile - --error-logfile - indexer.app:app -- 2.51.2