Spaces:
Sleeping
Sleeping
Commit
·
95377e0
1
Parent(s):
9bad066
Update Dockerfile
Browse files- Dockerfile +8 -1
Dockerfile
CHANGED
@@ -17,7 +17,14 @@ COPY ./gunicorn_config.py /code/gunicorn_config.py
|
|
17 |
COPY . .
|
18 |
|
19 |
# Create a directory for the instance folder and set permissions
|
20 |
-
RUN mkdir -p /code/instance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
# Command to run the application with Gunicorn and custom configuration
|
23 |
CMD ["gunicorn", "-b", "0.0.0.0:7860", "-c", "gunicorn_config.py", "main:app"]
|
|
|
17 |
COPY . .
|
18 |
|
19 |
# Create a directory for the instance folder and set permissions
|
20 |
+
RUN mkdir -p /code/instance \
|
21 |
+
&& chmod 777 /code/instance \
|
22 |
+
&& mkdir -p /code/media \
|
23 |
+
&& chmod 777 /code/media
|
24 |
+
|
25 |
+
# Create a non-root user and switch to it
|
26 |
+
RUN useradd -ms /bin/bash myuser
|
27 |
+
USER myuser
|
28 |
|
29 |
# Command to run the application with Gunicorn and custom configuration
|
30 |
CMD ["gunicorn", "-b", "0.0.0.0:7860", "-c", "gunicorn_config.py", "main:app"]
|