circulartext commited on
Commit
6bb32f9
1 Parent(s): e48122c

Create entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +15 -0
entrypoint.sh ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Create the appuser if it doesn't exist
4
+ if ! id -u appuser > /dev/null 2>&1; then
5
+ adduser --disabled-password --gecos '' appuser
6
+ fi
7
+
8
+ # Set appropriate permissions for the application directory
9
+ chown -R appuser:appuser /app
10
+ chmod -R 755 /app
11
+
12
+ # Any other setup or initialization steps go here
13
+
14
+ # Run the main application
15
+ exec gosu appuser uvicorn app.main:app --host 0.0.0.0 --port 7860 --reload