chore: sync local changes after pulling remote updates
This commit is contained in:
parent
515e2d53c9
commit
2852436a82
20
pm2.config.js
Normal file
20
pm2.config.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
module.exports = {
|
||||||
|
apps : [{
|
||||||
|
name: "frontend",
|
||||||
|
cwd: "./frontend",
|
||||||
|
script: "npm",
|
||||||
|
args: "start",
|
||||||
|
env: {
|
||||||
|
"PORT": 3000
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
name: "backend",
|
||||||
|
cwd: "./backend",
|
||||||
|
script: "./.venv/bin/uvicorn",
|
||||||
|
args: "app.main:app --host 0.0.0.0 --port 8000",
|
||||||
|
interpreter: "none",
|
||||||
|
env: {
|
||||||
|
"PYTHONPATH": "."
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
@ -62,6 +62,11 @@ cd frontend
|
|||||||
echo "--> Changed directory to $(pwd)"
|
echo "--> Changed directory to $(pwd)"
|
||||||
npm install
|
npm install
|
||||||
echo "Frontend setup complete."
|
echo "Frontend setup complete."
|
||||||
|
|
||||||
|
# --- Frontend Production Build ---
|
||||||
|
echo "Building frontend for production..."
|
||||||
|
npm run build
|
||||||
|
echo "Frontend build complete."
|
||||||
cd ..
|
cd ..
|
||||||
echo "--> Changed directory to $(pwd)"
|
echo "--> Changed directory to $(pwd)"
|
||||||
|
|
||||||
|
|||||||
10
scripts/stop.sh
Executable file
10
scripts/stop.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 停止所有用 pm2 启动的服务,并清理进程
|
||||||
|
|
||||||
|
echo "Stopping all pm2 applications..."
|
||||||
|
pm2 stop all
|
||||||
|
echo "All pm2 applications stopped."
|
||||||
|
|
||||||
|
echo "Deleting all pm2 processes..."
|
||||||
|
pm2 delete all
|
||||||
|
echo "All pm2 processes deleted."
|
||||||
Loading…
Reference in New Issue
Block a user