Spaces:
Runtime error
Runtime error
Update entrypoint.sh
Browse files- entrypoint.sh +10 -2
entrypoint.sh
CHANGED
@@ -1,8 +1,16 @@
|
|
1 |
#!/bin/bash
|
|
|
2 |
set -e
|
3 |
|
4 |
# Specify the path to your main.py file
|
5 |
MAIN_PATH="/app/main.py"
|
6 |
|
7 |
-
#
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
+
|
3 |
set -e
|
4 |
|
5 |
# Specify the path to your main.py file
|
6 |
MAIN_PATH="/app/main.py"
|
7 |
|
8 |
+
# Create the user if it doesn't already exist
|
9 |
+
if id -u "$USER_ID" >/dev/null 2>&1; then
|
10 |
+
echo "User with ID $USER_ID already exists."
|
11 |
+
else
|
12 |
+
adduser --disabled-password --uid "$USER_ID" user
|
13 |
+
fi
|
14 |
+
|
15 |
+
# Switch to the user before starting the application
|
16 |
+
exec gosu user "$@"
|