chakasoft commited on
Commit
250a15c
·
verified ·
1 Parent(s): 17de91b

Create entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +10 -0
entrypoint.sh ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ # 這個腳本的目的是繞過平台對啟動指令的覆蓋。
4
+ # 我們使用 exec 來讓 n8n 進程取代當前的 shell 進程,
5
+ # 這樣可以正確地處理關閉信號 (SIGTERM),實現平穩關機。
6
+ #
7
+ # 這是我們解決 IPv6 網路問題的關鍵所在,
8
+ # 確保 --dns-result-order=ipv4first 參數一定會被 Node.js 執行。
9
+
10
+ exec node --dns-result-order=ipv4first /usr/local/bin/n8n "$@"