habppyar commited on
Commit
625a577
·
verified ·
1 Parent(s): 4f49296

Create entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +7 -0
entrypoint.sh ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # 以 root 身份运行,设置持久化目录
3
+ mkdir -p /data/opencode_local /data/opencode_config
4
+ chown -R node:node /data/opencode_local /data/opencode_config
5
+
6
+ # 切换到 node 用户,执行 npm start
7
+ exec su - node -c "cd /home/node/app && npm start"