Spaces:
Sleeping
Sleeping
Commit
·
8412325
1
Parent(s):
65b960c
Update entrypoint.sh
Browse files- entrypoint.sh +10 -5
entrypoint.sh
CHANGED
@@ -1,7 +1,12 @@
|
|
1 |
-
#!/bin/
|
2 |
|
3 |
-
#
|
4 |
-
|
|
|
|
|
5 |
|
6 |
-
#
|
7 |
-
|
|
|
|
|
|
|
|
1 |
+
#!/bin/sh
|
2 |
|
3 |
+
# Create a new user if the USER_ID environment variable is set
|
4 |
+
if [ -n "$USER_ID" ]; then
|
5 |
+
useradd -m -u "$USER_ID" user
|
6 |
+
fi
|
7 |
|
8 |
+
# Switch to the user
|
9 |
+
su - user
|
10 |
+
|
11 |
+
# Start the application
|
12 |
+
uvicorn app.main:app --host 0.0.0.0 --port 7860 --reload
|