circulartext commited on
Commit
46a96ce
1 Parent(s): 9fbdde6

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +4 -9
entrypoint.sh CHANGED
@@ -1,13 +1,7 @@
1
  #!/bin/bash
2
 
3
- # Get the username from the environment variable
4
- USERNAME=$USERNAME
5
-
6
- # Check if the username is empty
7
- if [ -z "$USERNAME" ]; then
8
- echo "No username provided. Exiting..."
9
- exit 1
10
- fi
11
 
12
  # Check if the user already exists
13
  if id "$USERNAME" >/dev/null 2>&1; then
@@ -18,7 +12,8 @@ else
18
  fi
19
 
20
  # Set appropriate permissions for the application directory
21
- chown -R "$USERNAME":"$USERNAME" /app
22
 
23
  # Start your application
24
  exec gosu "$USERNAME" uvicorn app.main:app --host 0.0.0.0 --port 7860 --reload
 
 
1
  #!/bin/bash
2
 
3
+ # Get the username from the command line arguments
4
+ USERNAME=$1
 
 
 
 
 
 
5
 
6
  # Check if the user already exists
7
  if id "$USERNAME" >/dev/null 2>&1; then
 
12
  fi
13
 
14
  # Set appropriate permissions for the application directory
15
+ chmod -R 777 /app
16
 
17
  # Start your application
18
  exec gosu "$USERNAME" uvicorn app.main:app --host 0.0.0.0 --port 7860 --reload
19
+