Files
api7-demo/web/Dockerfile
d.viti 073d652869
All checks were successful
Build and Deploy / build-api (push) Successful in 36s
Build and Deploy / build-web (push) Successful in 1m19s
Fix mkdocs build error by moving mkdocs.yml to web root
- Moved mkdocs.yml from web/docs/ to web/ directory
- Updated Dockerfile to copy mkdocs.yml and build from correct location
- Set docs_dir to 'docs' in mkdocs.yml configuration
- Fixes Docker build error where mkdocs couldn't find documentation files
2025-10-03 01:44:41 +02:00

24 lines
455 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 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"]