From 0b02bb4a76bdef99eb38b337f3b29e4bdae2e0b7 Mon Sep 17 00:00:00 2001 From: swve Date: Sun, 21 Sep 2025 21:50:58 +0200 Subject: [PATCH] chore: update start script for improved logging and service management --- extra/start.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/extra/start.sh b/extra/start.sh index ac8a9646..61b2343d 100644 --- a/extra/start.sh +++ b/extra/start.sh @@ -1,14 +1,18 @@ #!/bin/sh +# Set environment variables for proper Python logging +export PYTHONUNBUFFERED=1 +export PYTHONIOENCODING=utf-8 + # Start the services pm2 start server.js --cwd /app/web --name learnhouse-web > /dev/null 2>&1 -pm2 start uv --cwd /app/api --name learnhouse-api -- run app.py 2>&1 +pm2 start uv --cwd /app/api --name learnhouse-api -- run app.py -# Check if the services are running qnd log the status +# Check if the services are running and log the status pm2 status # Start Nginx in the background nginx -g 'daemon off;' & -# Tail Nginx error and access logs -pm2 logs +# Tail PM2 logs with proper formatting +pm2 logs --raw