File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,22 +178,13 @@ jobs:
178178 pm2 jlist 2>/dev/null | grep -q "\"name\":\"$1\""
179179 }
180180
181- # Handle backend process
181+ # Restart both frontend and backend via config file
182182 if process_exists "${BACKEND_NAME}"; then
183183 echo "♻️ Restarting ${BACKEND_NAME}..."
184- pm2 restart "${BACKEND_NAME}"
184+ pm2 restart ${CONFIG_FILE}
185185 else
186186 echo "🚀 Starting ${BACKEND_NAME}..."
187- pm2 start ${CONFIG_FILE} --only "${BACKEND_NAME}"
188- fi
189-
190- # Handle frontend process
191- if process_exists "${FRONTEND_NAME}"; then
192- echo "♻️ Restarting \${FRONTEND_NAME}..."
193- pm2 restart "\${FRONTEND_NAME}"
194- else
195- echo "🚀 Starting \${FRONTEND_NAME}..."
196- pm2 start \${CONFIG_FILE} --only "\${FRONTEND_NAME}"
187+ pm2 start ${CONFIG_FILE}
197188 fi
198189
199190 pm2 save
You can’t perform that action at this time.
0 commit comments