File tree Expand file tree Collapse file tree 2 files changed +62
-0
lines changed
Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ # Multi-stage build for quantflow app
2+ # Stage 1: Build stage
3+ FROM python:3.14-slim AS builder
4+
5+ # Set working directory
6+ WORKDIR /build
7+
8+ # Install poetry
9+ RUN pip install poetry
10+
11+ # Copy dependency files including lock file
12+ COPY pyproject.toml poetry.lock readme.md ./
13+
14+ # Configure poetry to not create virtual environments and install dependencies
15+ RUN poetry config virtualenvs.create false && \
16+ poetry install --no-root --with book \
17+ --with docs --extras data --no-interaction --no-ansi
18+
19+ # Copy additional files needed for docs build
20+ COPY mkdocs.yml ./
21+ COPY docs/ ./docs/
22+ COPY quantflow/ ./quantflow/
23+
24+ # Build static documentation
25+ RUN mkdocs build
26+
27+ # Stage 2: Runtime stage
28+ FROM python:3.14-slim
29+
30+ # Set working directory
31+ WORKDIR /app
32+
33+ # Copy installed packages from builder
34+ COPY --from=builder /usr/local/lib/python3.14/site-packages /usr/local/lib/python3.14/site-packages
35+ COPY --from=builder /usr/local/bin /usr/local/bin
36+
37+ # Copy application code
38+ COPY quantflow/ ./quantflow/
39+ COPY app/ ./app/
40+ COPY pyproject.toml ./
41+
42+ # Copy built documentation from builder
43+ COPY --from=builder /build/app/docs ./app/docs
44+
45+ # Set Python path
46+ ENV PYTHONPATH=/app
47+ ENV PYTHONUNBUFFERED=1
48+
49+ # Expose port
50+ EXPOSE 8001
51+
52+ # Run the application
53+ CMD ["python" , "-m" , "app" ]
Original file line number Diff line number Diff line change 1+ [project ]
2+
3+ [git ]
4+ default_branch = " main"
5+
6+ [docker ]
7+ image_branch_tag_prefix = " branch"
8+ image_repo_url = " quantmind/quantflow"
9+ files_path = " dev"
You can’t perform that action at this time.
0 commit comments