Mbonea commited on
Commit
0e8e94c
·
1 Parent(s): 6878fd1
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -6,7 +6,7 @@ RUN groupadd -r appuser && useradd -r -g appuser appuser
6
 
7
  # Set the working directory and grant permissions to the non-root user
8
  WORKDIR /srv
9
- RUN chown appuser:appuser /srv
10
 
11
  # Install dependencies and Python packages
12
  RUN apt-get update && apt-get install -y git ffmpeg aria2 \
@@ -15,8 +15,9 @@ RUN apt-get update && apt-get install -y git ffmpeg aria2 \
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # Copy the application code
19
  COPY . /srv
 
20
 
21
  # Switch to the non-root user
22
  USER appuser
@@ -25,4 +26,4 @@ USER appuser
25
  CMD uvicorn App.app:app --host 0.0.0.0 --port 7860 & celery -A App.Worker.celery worker -c 8 --loglevel=info
26
 
27
  # Expose the application port
28
- EXPOSE 7860
 
6
 
7
  # Set the working directory and grant permissions to the non-root user
8
  WORKDIR /srv
9
+ RUN chown -R appuser:appuser /srv
10
 
11
  # Install dependencies and Python packages
12
  RUN apt-get update && apt-get install -y git ffmpeg aria2 \
 
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
+ # Copy the application code and grant permissions to the non-root user
19
  COPY . /srv
20
+ RUN chown -R appuser:appuser /srv
21
 
22
  # Switch to the non-root user
23
  USER appuser
 
26
  CMD uvicorn App.app:app --host 0.0.0.0 --port 7860 & celery -A App.Worker.celery worker -c 8 --loglevel=info
27
 
28
  # Expose the application port
29
+ EXPOSE 7860