| FROM python:3.11-slim | |
| WORKDIR /app | |
| # ββ Install system dependencies ββββββββββββββββββββ | |
| # curl: useful for health checks and debugging | |
| # git: required by backup.sh to push data to GitHub | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # ββ Python dependencies βββββββββββββββββββββββββββ | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # ββ Copy application code βββββββββββββββββββββββββ | |
| COPY . . | |
| # ββ Ensure startup scripts are executable βββββββββ | |
| RUN chmod +x startup.sh | |
| RUN chmod +x backup.sh | |
| # ββ Create wiki directory βββββββββββββββββββββββββ | |
| RUN mkdir -p wiki | |
| EXPOSE 7860 | |
| CMD ["./startup.sh"] |