Spaces:
Paused
Paused
Create start.sh
Browse files
start.sh
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Print environment for debugging
|
4 |
+
echo "Starting Langfuse..."
|
5 |
+
echo "PORT: $PORT"
|
6 |
+
echo "HOSTNAME: $HOSTNAME"
|
7 |
+
echo "DATABASE_URL: $DATABASE_URL"
|
8 |
+
|
9 |
+
# Ensure the database directory exists
|
10 |
+
mkdir -p /tmp
|
11 |
+
|
12 |
+
# Debug: Check if required environment variables are set
|
13 |
+
if [ -z "$NEXTAUTH_SECRET" ] || [ -z "$SALT" ]; then
|
14 |
+
echo "ERROR: Missing critical environment variables"
|
15 |
+
exit 1
|
16 |
+
fi
|
17 |
+
|
18 |
+
# Attempt to start the application with verbose logging
|
19 |
+
echo "Attempting to start Langfuse server..."
|
20 |
+
exec npm run start
|