We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
startup.sh
1 parent f2cff24 commit 6489d91Copy full SHA for 6489d91
startup.sh
@@ -0,0 +1,27 @@
1
+#!/bin/bash
2
+set -euo pipefail
3
+
4
+# Load environment variables from .env file
5
+source .env
6
7
+# Check if environment variables are set
8
+if [[ -z "$OPENAI_API_KEY" ]]; then
9
+ echo "Error: OPENAI_API_KEY environment variable is not set."
10
+ exit 1
11
+fi
12
13
+if [[ -z "$DATABASE_URL" ]]; then
14
+ echo "Error: DATABASE_URL environment variable is not set."
15
16
17
18
+if [[ -z "$SECRET_KEY" ]]; then
19
+ echo "Error: SECRET_KEY environment variable is not set."
20
21
22
23
+# Initialize the database
24
+alembic upgrade head
25
26
+# Start the application server using uvicorn
27
+uvicorn main:app --host 0.0.0.0 --port 8000
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments