Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +11 -12
Dockerfile
CHANGED
|
@@ -3,25 +3,24 @@ FROM python:3.9-slim
|
|
| 3 |
# Set working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
# Create necessary directories first
|
| 7 |
RUN mkdir -p /app/templates /app/instance/sessions
|
| 8 |
|
| 9 |
-
# Copy
|
| 10 |
-
COPY requirements.txt .
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
# Copy application files
|
| 14 |
-
COPY app.py .
|
| 15 |
-
COPY difydev.py .
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
COPY templates/* templates/
|
| 19 |
-
|
| 20 |
-
# Debug: Show directory structure
|
| 21 |
RUN echo "=== Directory Structure ===" && \
|
| 22 |
ls -la /app && \
|
| 23 |
echo "\n=== Templates Directory ===" && \
|
| 24 |
-
ls -la /app/templates
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
# Create gunicorn config file
|
| 27 |
RUN echo 'bind = "0.0.0.0:7860"\n\
|
|
|
|
| 3 |
# Set working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Debug: Show source directory contents
|
| 7 |
+
RUN pwd && echo "Source directory contents:" && ls -la
|
| 8 |
+
|
| 9 |
# Create necessary directories first
|
| 10 |
RUN mkdir -p /app/templates /app/instance/sessions
|
| 11 |
|
| 12 |
+
# Copy files with error handling
|
| 13 |
+
COPY ["./requirements.txt", "./app.py", "./difydev.py", "./"]
|
| 14 |
+
COPY ["./templates/dashboard.html", "./templates/difydev.html", "./templates/login.html", "./templates/"]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
# Debug: Show copied files
|
|
|
|
|
|
|
|
|
|
| 17 |
RUN echo "=== Directory Structure ===" && \
|
| 18 |
ls -la /app && \
|
| 19 |
echo "\n=== Templates Directory ===" && \
|
| 20 |
+
ls -la /app/templates
|
| 21 |
+
|
| 22 |
+
# Install dependencies
|
| 23 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 24 |
|
| 25 |
# Create gunicorn config file
|
| 26 |
RUN echo 'bind = "0.0.0.0:7860"\n\
|