Update entrypoint.sh
Browse files- entrypoint.sh +10 -10
entrypoint.sh
CHANGED
@@ -1,15 +1,5 @@
|
|
1 |
#!/bin/sh
|
2 |
|
3 |
-
# if has CERT_FILE env and CERT_KEY env, run uvicorn with ssl
|
4 |
-
|
5 |
-
if [ -n "$CERT_FILE" ] && [ -n "$CERT_KEY" ]; then
|
6 |
-
echo "run uvicorn with ssl"
|
7 |
-
python -m uvicorn app.main:app --host 0.0.0.0 --port 443 --ssl-keyfile $CERT_KEY --ssl-certfile $CERT_FILE $args $@
|
8 |
-
else
|
9 |
-
echo "run uvicorn without ssl"
|
10 |
-
python -m uvicorn app.main:app --host 0.0.0.0 --port 3000 $@
|
11 |
-
fi
|
12 |
-
|
13 |
# 判断处理器架构
|
14 |
case "$(uname -m)" in
|
15 |
aarch64|arm64 )
|
@@ -35,4 +25,14 @@ chmod +x /project/cloudflared
|
|
35 |
# 运行 cloudflared
|
36 |
/project/cloudflared tunnel run --token ${ARGO_AUTH} &
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
wait
|
|
|
1 |
#!/bin/sh
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
# 判断处理器架构
|
4 |
case "$(uname -m)" in
|
5 |
aarch64|arm64 )
|
|
|
25 |
# 运行 cloudflared
|
26 |
/project/cloudflared tunnel run --token ${ARGO_AUTH} &
|
27 |
|
28 |
+
# if has CERT_FILE env and CERT_KEY env, run uvicorn with ssl
|
29 |
+
|
30 |
+
if [ -n "$CERT_FILE" ] && [ -n "$CERT_KEY" ]; then
|
31 |
+
echo "run uvicorn with ssl"
|
32 |
+
python -m uvicorn app.main:app --host 0.0.0.0 --port 443 --ssl-keyfile $CERT_KEY --ssl-certfile $CERT_FILE $args $@
|
33 |
+
else
|
34 |
+
echo "run uvicorn without ssl"
|
35 |
+
python -m uvicorn app.main:app --host 0.0.0.0 --port 3000 $@
|
36 |
+
fi
|
37 |
+
|
38 |
wait
|