amangs commited on
Commit
341e7f6
·
1 Parent(s): a03d338

Fix Codeman execution and proxy routing at root

Browse files
config/Caddyfile.example CHANGED
@@ -63,8 +63,6 @@
63
 
64
  # 6. Codeman UI at root
65
  handle {
66
- reverse_proxy 127.0.0.1:3000 {
67
- header_up Host 127.0.0.1
68
- }
69
  }
70
  }
 
63
 
64
  # 6. Codeman UI at root
65
  handle {
66
+ reverse_proxy 127.0.0.1:3000
 
 
67
  }
68
  }
services/25-codeman.sh CHANGED
@@ -34,12 +34,10 @@ fi
34
  cd /data/workspace || exit 1
35
  CMD="/usr/local/bin/codeman"
36
  if [ ! -x "$CMD" ]; then
37
- CMD="$(command -v codeman || find / -name codeman 2>/dev/null | head -1)"
38
  fi
39
-
40
  if [ -z "$CMD" ] || [ ! -x "$CMD" ]; then
41
- echo "codeman binary not ready yet" >> "$LOG"
42
- exit 1
43
  fi
44
 
45
- exec "$CMD" --port 3000 --host 0.0.0.0 >> "$LOG" 2>&1
 
34
  cd /data/workspace || exit 1
35
  CMD="/usr/local/bin/codeman"
36
  if [ ! -x "$CMD" ]; then
37
+ CMD="$(command -v codeman || which codeman 2>/dev/null)"
38
  fi
 
39
  if [ -z "$CMD" ] || [ ! -x "$CMD" ]; then
40
+ CMD="npx -y aicodeman@latest"
 
41
  fi
42
 
43
+ exec $CMD --port 3000 --host 0.0.0.0 >> "$LOG" 2>&1