m-ric commited on
Commit
c6c00a5
·
verified ·
1 Parent(s): a4ec759

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -1
Dockerfile CHANGED
@@ -33,7 +33,15 @@ WORKDIR $HOME/app
33
  COPY --from=builder /app/build ./static
34
  COPY . .
35
 
36
- CMD ["python", "app.py"]
 
37
 
 
 
38
 
 
 
 
39
 
 
 
 
33
  COPY --from=builder /app/build ./static
34
  COPY . .
35
 
36
+ # Copy application files
37
+ COPY --chown=user . /app
38
 
39
+ # Switch to the non-root user
40
+ USER user
41
 
42
+ # Set environment variables
43
+ ENV HOME=/home/user \
44
+ PATH=/home/user/.local/bin:$PATH
45
 
46
+ # Command to run the application
47
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]