Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -24
Dockerfile
CHANGED
@@ -1,34 +1,16 @@
|
|
1 |
-
|
2 |
-
FROM python:3.9-slim
|
3 |
|
4 |
-
# Set environment variables
|
5 |
-
ENV FLASK_APP=app.py
|
6 |
-
ENV FLASK_RUN_HOST=0.0.0.0
|
7 |
-
ENV FLASK_RUN_PORT=80
|
8 |
-
ENV XDG_CACHE_HOME=/app/.cache
|
9 |
-
# Set a writable cache directory
|
10 |
-
|
11 |
-
# Install ffmpeg and other dependencies
|
12 |
-
RUN apt-get update && \
|
13 |
-
apt-get install -y ffmpeg && \
|
14 |
-
apt-get clean && \
|
15 |
-
rm -rf /var/lib/apt/lists/*
|
16 |
-
|
17 |
-
# Set the working directory
|
18 |
WORKDIR /app
|
19 |
|
20 |
-
# Create the cache and uploads directories with the right permissions
|
21 |
-
RUN mkdir -p /app/.cache /app/uploads && \
|
22 |
-
chmod 777 /app/.cache /app/uploads
|
23 |
-
|
24 |
-
# Copy the application files to the container
|
25 |
COPY . /app
|
26 |
|
27 |
-
|
|
|
28 |
RUN pip install --no-cache-dir -r requirements.txt
|
29 |
|
30 |
-
# Expose the port on which the app will run
|
31 |
EXPOSE 80
|
32 |
|
33 |
-
|
|
|
|
|
34 |
CMD ["flask", "run", "--host=0.0.0.0", "--port=80"]
|
|
|
1 |
+
FROM python:3.10-slim
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
WORKDIR /app
|
4 |
|
|
|
|
|
|
|
|
|
|
|
5 |
COPY . /app
|
6 |
|
7 |
+
RUN mkdir -p uploads && chmod 755 uploads
|
8 |
+
|
9 |
RUN pip install --no-cache-dir -r requirements.txt
|
10 |
|
|
|
11 |
EXPOSE 80
|
12 |
|
13 |
+
ENV FLASK_APP=app.py
|
14 |
+
ENV FLASK_RUN_HOST=0.0.0.0
|
15 |
+
|
16 |
CMD ["flask", "run", "--host=0.0.0.0", "--port=80"]
|