Spaces:
Sleeping
Sleeping
circulartext
commited on
Commit
•
3068f36
1
Parent(s):
4e7e6c5
Update entrypoint.sh
Browse files- entrypoint.sh +4 -17
entrypoint.sh
CHANGED
@@ -1,19 +1,6 @@
|
|
1 |
-
#!/bin/
|
|
|
2 |
|
3 |
-
#
|
4 |
-
|
5 |
-
|
6 |
-
# Check if the user already exists
|
7 |
-
if id "$USERNAME" >/dev/null 2>&1; then
|
8 |
-
echo "User $USERNAME already exists."
|
9 |
-
else
|
10 |
-
# Create the user with a home directory and a bash shell
|
11 |
-
useradd -m -s /bin/bash "$USERNAME"
|
12 |
-
fi
|
13 |
-
|
14 |
-
# Set appropriate permissions for the application directory
|
15 |
-
chown -R "$USERNAME":"$USERNAME" /app
|
16 |
-
|
17 |
-
# Start your application
|
18 |
-
exec gosu "$USERNAME" uvicorn app.main:app --host 0.0.0.0 --port 7860 --reload
|
19 |
|
|
|
1 |
+
#!/bin/sh
|
2 |
+
set -e
|
3 |
|
4 |
+
# Execute the main command
|
5 |
+
exec "$@"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|