Spaces:
Build error
Build error
Update start.sh
Browse files
start.sh
CHANGED
@@ -1,4 +1,11 @@
|
|
1 |
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
# Wait for PostgreSQL
|
3 |
while ! pg_isready -q -h localhost -p 5432 -U postadmin
|
4 |
do
|
@@ -9,5 +16,5 @@ done
|
|
9 |
# Run migrations
|
10 |
alembic upgrade head
|
11 |
|
12 |
-
# Start
|
13 |
-
|
|
|
1 |
#!/bin/bash
|
2 |
+
|
3 |
+
# Start Redis
|
4 |
+
service redis-server start
|
5 |
+
|
6 |
+
# Start PostgreSQL
|
7 |
+
service postgresql start
|
8 |
+
|
9 |
# Wait for PostgreSQL
|
10 |
while ! pg_isready -q -h localhost -p 5432 -U postadmin
|
11 |
do
|
|
|
16 |
# Run migrations
|
17 |
alembic upgrade head
|
18 |
|
19 |
+
# Start the FastAPI app using Uvicorn
|
20 |
+
uvicorn app:app --host 0.0.0.0 --port 7860
|