jamesw853 commited on
Commit
ec550ee
·
verified ·
1 Parent(s): d96a634

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +7 -4
entrypoint.sh CHANGED
@@ -1,15 +1,18 @@
1
  #!/bin/bash
2
  set -e
3
 
4
- # 启动 opencode serve 后台进程
5
- /home/user/.opencode/bin/opencode serve --host 0.0.0.0 --port 7860 &
 
 
 
6
  OPCODE_PID=$!
7
 
8
- # 启动同步脚本(它自身会无限循环
9
  python3 /home/user/sync_to_dataset.py &
10
  SYNC_PID=$!
11
 
12
- # 等待任意子进程退出(如果 opencode 崩溃,容器也应退出)
13
  wait -n
14
 
15
  # 退出时杀死另一个进程
 
1
  #!/bin/bash
2
  set -e
3
 
4
+ # 启动 opencode serve 后台进程(正确参数:--hostname, --port, --print-logs)
5
+ /home/user/.opencode/bin/opencode serve \
6
+ --hostname 0.0.0.0 \
7
+ --port 7860 \
8
+ --print-logs &
9
  OPCODE_PID=$!
10
 
11
+ # 启动同步脚本(后台
12
  python3 /home/user/sync_to_dataset.py &
13
  SYNC_PID=$!
14
 
15
+ # 等待任意子进程退出(如果 opencode 崩溃,容器退出)
16
  wait -n
17
 
18
  # 退出时杀死另一个进程