Files
api7-demo/web/Dockerfile
d.viti 5710df19d9
All checks were successful
Helm Chart Build / lint-only (push) Has been skipped
Helm Chart Build / build-helm (push) Successful in 8s
Build and Deploy / build-api (push) Successful in 45s
Build and Deploy / build-web (push) Successful in 1m2s
Fix web Dockerfile to copy templates directory
Fixed TemplateNotFound error by adding missing templates directory
to the Docker image.

Error:
  jinja2.exceptions.TemplateNotFound: index.html

Cause:
  Dockerfile was not copying the templates/ directory into the container

Fix:
  Added 'COPY templates/ ./templates/' to Dockerfile

The web application requires templates/ directory for Jinja2 templates:
- templates/base.html
- templates/index.html
- templates/items.html
- templates/users.html
- templates/llm.html

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 17:40:01 +02:00

26 lines
507 B
Docker

FROM python:3.11-slim
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application and documentation
COPY main.py .
COPY templates/ ./templates/
COPY static/ ./static/
COPY docs/ ./docs/
COPY mkdocs.yml .
# Build documentation during image build
RUN mkdocs build -d site
# Expose port
EXPOSE 8000
# Run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]