Update run.sh
Browse files
run.sh
CHANGED
|
@@ -1,24 +1,15 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
-
#
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
#
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
--no-browser \
|
| 17 |
-
--allow-root \
|
| 18 |
-
--ServerApp.token="$JUPYTER_TOKEN" \
|
| 19 |
-
--ServerApp.tornado_settings="{'headers': {'Content-Security-Policy': 'frame-ancestors *'}}" \
|
| 20 |
-
--ServerApp.cookie_options="{'SameSite': 'None', 'Secure': True}" \
|
| 21 |
-
--ServerApp.disable_check_xsrf=True \
|
| 22 |
-
--LabApp.news_url=None \
|
| 23 |
-
--LabApp.check_for_updates_class="jupyterlab.NeverCheckForUpdate" \
|
| 24 |
-
--notebook-dir=$NOTEBOOK_DIR
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
+
# 启动 PostgreSQL 服务
|
| 4 |
+
docker-entrypoint.sh postgres &
|
| 5 |
+
|
| 6 |
+
# 检查 PostgreSQL 服务是否已启动
|
| 7 |
+
echo "等待 PostgreSQL 服务启动..."
|
| 8 |
+
until pg_isready -h localhost; do
|
| 9 |
+
sleep 2
|
| 10 |
+
done
|
| 11 |
+
echo "PostgreSQL 服务已启动!"
|
| 12 |
+
|
| 13 |
+
# 启动 Flask 应用
|
| 14 |
+
echo "启动 Flask 应用..."
|
| 15 |
+
python3 app.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|