mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-18 11:59:26 +00:00
chore: update start script for improved logging and service management
This commit is contained in:
parent
a670336c68
commit
0b02bb4a76
1 changed files with 8 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue