Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +15 -9
Dockerfile
CHANGED
@@ -1,13 +1,19 @@
|
|
1 |
FROM python:3.9
|
2 |
-
|
3 |
-
RUN useradd -m -u 1000 user
|
4 |
-
USER user
|
5 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
6 |
-
|
7 |
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
-
|
10 |
-
|
|
|
11 |
|
12 |
-
|
13 |
-
CMD ["flask", "run", "--host
|
|
|
1 |
FROM python:3.9
|
|
|
|
|
|
|
|
|
|
|
2 |
WORKDIR /app
|
3 |
+
COPY requirements.txt .
|
4 |
+
RUN pip install -r requirements.txt
|
5 |
+
COPY . .
|
6 |
+
# Create directory for session files
|
7 |
+
RUN mkdir -p /app/flask_session
|
8 |
+
# Make upload directory
|
9 |
+
RUN mkdir -p /app/static/uploads
|
10 |
+
# Set permissions
|
11 |
+
RUN chmod -R 777 /app/static/uploads
|
12 |
+
RUN chmod -R 777 /app/flask_session
|
13 |
|
14 |
+
# Set environment variables
|
15 |
+
ENV FLASK_APP=app.py
|
16 |
+
ENV FLASK_ENV=production
|
17 |
|
18 |
+
# Run the app
|
19 |
+
CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]
|