- **Common Contracts**: Updated DTOs and models to support workflow history; removed legacy analysis result DTOs.
- **Data Persistence Service**:
- Removed `analysis_results` table logic and API endpoints.
- Implemented `workflow_history` API and DB access (`history.rs`).
- Fixed compilation errors and updated tests.
- Exposed Postgres port in `docker-compose.yml` for easier debugging/offline checks.
- **API Gateway**:
- Implemented `history` endpoints (get history list, get by ID).
- Removed legacy `analysis-results` endpoints.
- Fixed routing and handler logic in `api.rs`.
- **Report Generator Service**:
- Removed dependency on legacy `analysis-results` persistence calls.
- Fixed compilation errors.
- **Workflow Orchestrator**: Fixed warnings and minor logic issues.
- **Providers**: Updated provider services (alphavantage, tushare, finnhub, yfinance, mock) to align with contract changes.
- **Frontend**:
- Updated `ReportPage` and stores to use new workflow history.
- Added `RecentReportsDropdown` component.
- Cleaned up `RealtimeLogs` component.
- **Documentation**: Moved completed design tasks to `completed/` and added refactoring context docs.
Confirmed all services pass `cargo check`.
33 lines
1.2 KiB
Docker
33 lines
1.2 KiB
Docker
# 1. Build Stage
|
|
FROM rust:1.90-bookworm as builder
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Deterministic dependency caching without shipping a stub binary
|
|
COPY ./services/common-contracts /usr/src/app/services/common-contracts
|
|
COPY ./crates/workflow-context /usr/src/app/crates/workflow-context
|
|
COPY ./services/api-gateway/Cargo.toml ./services/api-gateway/Cargo.lock* ./services/api-gateway/
|
|
WORKDIR /usr/src/app/services/api-gateway
|
|
# Copy the full source code and build the final binary (Debug mode for speed)
|
|
COPY ./services/api-gateway /usr/src/app/services/api-gateway
|
|
RUN cargo build --bin api-gateway
|
|
|
|
# 2. Runtime Stage
|
|
FROM debian:bookworm-slim
|
|
|
|
# Set timezone
|
|
ENV TZ=Asia/Shanghai
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
# Install minimal runtime deps:
|
|
# - ca-certificates/libssl3: TLS support for outbound HTTPS
|
|
# - curl: required for container healthcheck defined in docker-compose.yml
|
|
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates libssl3 curl && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy the built binary from the builder stage
|
|
COPY --from=builder /usr/src/app/services/api-gateway/target/debug/api-gateway /usr/local/bin/
|
|
|
|
# Set the binary as the entrypoint
|
|
ENTRYPOINT ["/usr/local/bin/api-gateway"]
|
|
|
|
|