ohmyapi commited on
Commit
e609cd8
·
verified ·
1 Parent(s): 96f50aa

Create entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +12 -0
entrypoint.sh ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ mkdir -p /tmp/data
3
+
4
+ # 只有这三个字段没有对应环境变量,必须写入 config.toml
5
+ cat > /tmp/data/config.toml << EOF
6
+ [app]
7
+ app_key = "${APP_KEY:-grok2api}"
8
+ api_key = "${API_KEY:-}"
9
+ app_url = "${APP_URL:-}"
10
+ EOF
11
+
12
+ exec uv run granian --interface asgi --host 0.0.0.0 --port 7860 --workers 1 main:app