Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -9
Dockerfile
CHANGED
@@ -22,8 +22,14 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
22 |
# Create a directory for cache and set permissions
|
23 |
RUN mkdir -p $HOME/.cache && chmod 777 $HOME/.cache
|
24 |
|
|
|
|
|
|
|
25 |
# Create the database file and set permissions
|
26 |
-
RUN touch $HOME/users.db &&
|
|
|
|
|
|
|
27 |
|
28 |
# Switch back to the user
|
29 |
USER user
|
@@ -31,13 +37,5 @@ USER user
|
|
31 |
# Set the working directory for the application
|
32 |
WORKDIR $HOME
|
33 |
|
34 |
-
RUN pwd && ls -l
|
35 |
-
RUN ls -ld
|
36 |
-
|
37 |
-
RUN chmod -R 777 .
|
38 |
-
|
39 |
-
.
|
40 |
-
|
41 |
-
|
42 |
# Start the application using gunicorn
|
43 |
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "--timeout", "300", "main:app"]
|
|
|
22 |
# Create a directory for cache and set permissions
|
23 |
RUN mkdir -p $HOME/.cache && chmod 777 $HOME/.cache
|
24 |
|
25 |
+
# Set permissions for the current directory (parent directory)
|
26 |
+
RUN chmod -R 777 .
|
27 |
+
|
28 |
# Create the database file and set permissions
|
29 |
+
RUN touch $HOME/users.db && chmod 777 $HOME/users.db
|
30 |
+
|
31 |
+
# Change ownership of mentor.txt and temp_mentor.txt
|
32 |
+
RUN chown user:user $HOME/mentor.txt $HOME/temp_mentor.txt
|
33 |
|
34 |
# Switch back to the user
|
35 |
USER user
|
|
|
37 |
# Set the working directory for the application
|
38 |
WORKDIR $HOME
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
# Start the application using gunicorn
|
41 |
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "--timeout", "300", "main:app"]
|