mirror of
https://github.com/thecyberlearn/quantumtaskai-caprover.git
synced 2026-08-18 09:52:57 +00:00
- Switch to debug Dockerfile with detailed logging - Add Dockerfile.test for basic container functionality test - Enable debug mode to see detailed startup logs - This will help identify where the 404 error is coming from
40 lines
1.1 KiB
Docker
40 lines
1.1 KiB
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
gcc \
|
|
libpq-dev \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy and install Python dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Set minimal environment variables
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
DEBUG=true \
|
|
SECRET_KEY="test-secret-key-123456789" \
|
|
ALLOWED_HOSTS="*"
|
|
|
|
# Expose port 3000
|
|
EXPOSE 3000
|
|
|
|
# Very simple test - just run a basic HTTP server
|
|
CMD echo "🧪 TEST MODE - Container is running!" && \
|
|
echo "📋 Environment Check:" && \
|
|
echo " - Python: $(python --version)" && \
|
|
echo " - Django: $(python -c 'import django; print(django.get_version())')" && \
|
|
echo " - Working directory: $(pwd)" && \
|
|
echo " - Files: $(ls -la | head -10)" && \
|
|
echo "" && \
|
|
echo "🌐 Testing Django..." && \
|
|
python manage.py check --settings=netcop_hub.settings && \
|
|
echo "✅ Django OK - Starting simple HTTP server on port 3000" && \
|
|
python -m http.server 3000
|