fix(docker): add missing workspace members and SQLX_OFFLINE to all Dockerfiles
All 6 service Dockerfiles were missing newly-added workspace crates (web-gateway, ctrader-openapi, foxhunt-deploy, broker_gateway_service), causing cargo workspace resolution failures during Docker builds. Changes across all Dockerfiles: - Add COPY directives for web-gateway, ctrader-openapi, foxhunt-deploy, broker_gateway_service (new workspace members since Dockerfiles written) - Add SQLX_OFFLINE=true env and .sqlx cache copy where missing - Add perl and make system deps (needed for OpenSSL build from source) - Remove COPY migrations (dir excluded by .dockerignore, not needed) - Expand broker_gateway_service from 3-crate to full workspace copy Validated: docker build --check passes all 6, cargo check -p passes all 6. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -5715,6 +5715,7 @@ dependencies = [
|
||||
"thiserror 1.0.69",
|
||||
"tokio",
|
||||
"tokio-test",
|
||||
"toml",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"trading_engine",
|
||||
|
||||
@@ -11,6 +11,8 @@ RUN apt-get update && apt-get install -y \
|
||||
pkg-config \
|
||||
libssl-dev \
|
||||
protobuf-compiler \
|
||||
perl \
|
||||
make \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory
|
||||
@@ -19,6 +21,9 @@ WORKDIR /build
|
||||
# Copy workspace manifests
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
|
||||
# Copy sqlx offline cache for compile-time query verification
|
||||
COPY .sqlx ./.sqlx
|
||||
|
||||
# Copy workspace members to satisfy manifest dependencies
|
||||
COPY trading_engine ./trading_engine
|
||||
COPY risk ./risk
|
||||
@@ -36,7 +41,11 @@ COPY model_loader ./model_loader
|
||||
COPY market-data ./market-data
|
||||
COPY database ./database
|
||||
COPY config ./config
|
||||
COPY web-gateway ./web-gateway
|
||||
COPY ctrader-openapi ./ctrader-openapi
|
||||
COPY foxhunt-deploy ./foxhunt-deploy
|
||||
COPY services/backtesting_service ./services/backtesting_service
|
||||
COPY services/broker_gateway_service ./services/broker_gateway_service
|
||||
COPY services/trading_service ./services/trading_service
|
||||
COPY services/ml_training_service ./services/ml_training_service
|
||||
COPY services/data_acquisition_service ./services/data_acquisition_service
|
||||
@@ -46,7 +55,9 @@ COPY services/load_tests ./services/load_tests
|
||||
COPY services/stress_tests ./services/stress_tests
|
||||
COPY services/integration_tests ./services/integration_tests
|
||||
COPY tests ./tests
|
||||
COPY migrations ./migrations
|
||||
|
||||
# Enable sqlx offline mode to use cached query metadata
|
||||
ENV SQLX_OFFLINE=true
|
||||
|
||||
# Build the application
|
||||
RUN cargo build --release -p api_gateway
|
||||
|
||||
@@ -11,6 +11,8 @@ RUN apt-get update && apt-get install -y \
|
||||
pkg-config \
|
||||
libssl-dev \
|
||||
protobuf-compiler \
|
||||
perl \
|
||||
make \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory
|
||||
@@ -24,6 +26,9 @@ ENV CUDA_COMPUTE_CAP=86
|
||||
# Copy workspace manifests
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
|
||||
# Copy sqlx offline cache for compile-time query verification
|
||||
COPY .sqlx ./.sqlx
|
||||
|
||||
# Copy workspace members to satisfy manifest dependencies
|
||||
COPY trading_engine ./trading_engine
|
||||
COPY risk ./risk
|
||||
@@ -41,7 +46,11 @@ COPY model_loader ./model_loader
|
||||
COPY market-data ./market-data
|
||||
COPY database ./database
|
||||
COPY config ./config
|
||||
COPY web-gateway ./web-gateway
|
||||
COPY ctrader-openapi ./ctrader-openapi
|
||||
COPY foxhunt-deploy ./foxhunt-deploy
|
||||
COPY services/backtesting_service ./services/backtesting_service
|
||||
COPY services/broker_gateway_service ./services/broker_gateway_service
|
||||
COPY services/trading_service ./services/trading_service
|
||||
COPY services/ml_training_service ./services/ml_training_service
|
||||
COPY services/data_acquisition_service ./services/data_acquisition_service
|
||||
@@ -51,7 +60,9 @@ COPY services/load_tests ./services/load_tests
|
||||
COPY services/stress_tests ./services/stress_tests
|
||||
COPY services/integration_tests ./services/integration_tests
|
||||
COPY tests ./tests
|
||||
COPY migrations ./migrations
|
||||
|
||||
# Enable sqlx offline mode to use cached query metadata
|
||||
ENV SQLX_OFFLINE=true
|
||||
|
||||
# Build the application
|
||||
RUN cargo build --release -p backtesting_service
|
||||
|
||||
@@ -24,10 +24,43 @@ WORKDIR /app
|
||||
# Copy workspace manifests first for dependency caching
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
|
||||
# Copy all workspace members (needed for dependency resolution)
|
||||
# Copy sqlx offline cache for compile-time query verification
|
||||
COPY .sqlx ./.sqlx
|
||||
|
||||
# Copy all workspace members (needed for workspace resolution)
|
||||
COPY trading_engine ./trading_engine
|
||||
COPY risk ./risk
|
||||
COPY risk-data ./risk-data
|
||||
COPY trading-data ./trading-data
|
||||
COPY tli ./tli
|
||||
COPY ml ./ml
|
||||
COPY ml-data ./ml-data
|
||||
COPY data ./data
|
||||
COPY backtesting ./backtesting
|
||||
COPY adaptive-strategy ./adaptive-strategy
|
||||
COPY common ./common
|
||||
COPY storage ./storage
|
||||
COPY model_loader ./model_loader
|
||||
COPY market-data ./market-data
|
||||
COPY database ./database
|
||||
COPY config ./config
|
||||
COPY web-gateway ./web-gateway
|
||||
COPY ctrader-openapi ./ctrader-openapi
|
||||
COPY foxhunt-deploy ./foxhunt-deploy
|
||||
COPY services/backtesting_service ./services/backtesting_service
|
||||
COPY services/broker_gateway_service ./services/broker_gateway_service
|
||||
COPY services/trading_service ./services/trading_service
|
||||
COPY services/ml_training_service ./services/ml_training_service
|
||||
COPY services/data_acquisition_service ./services/data_acquisition_service
|
||||
COPY services/trading_agent_service ./services/trading_agent_service
|
||||
COPY services/api_gateway ./services/api_gateway
|
||||
COPY services/load_tests ./services/load_tests
|
||||
COPY services/stress_tests ./services/stress_tests
|
||||
COPY services/integration_tests ./services/integration_tests
|
||||
COPY tests ./tests
|
||||
|
||||
# Enable sqlx offline mode to use cached query metadata
|
||||
ENV SQLX_OFFLINE=true
|
||||
|
||||
# Build dependencies (this layer is cached unless dependencies change)
|
||||
# Use BuildKit cache mount for cargo registry
|
||||
|
||||
@@ -56,7 +56,11 @@ COPY model_loader ./model_loader
|
||||
COPY market-data ./market-data
|
||||
COPY database ./database
|
||||
COPY config ./config
|
||||
COPY web-gateway ./web-gateway
|
||||
COPY ctrader-openapi ./ctrader-openapi
|
||||
COPY foxhunt-deploy ./foxhunt-deploy
|
||||
COPY services/backtesting_service ./services/backtesting_service
|
||||
COPY services/broker_gateway_service ./services/broker_gateway_service
|
||||
COPY services/trading_service ./services/trading_service
|
||||
COPY services/ml_training_service ./services/ml_training_service
|
||||
COPY services/api_gateway ./services/api_gateway
|
||||
@@ -66,7 +70,6 @@ COPY services/integration_tests ./services/integration_tests
|
||||
COPY services/data_acquisition_service ./services/data_acquisition_service
|
||||
COPY services/trading_agent_service ./services/trading_agent_service
|
||||
COPY tests ./tests
|
||||
COPY migrations ./migrations
|
||||
|
||||
# Enable sqlx offline mode to use cached query metadata
|
||||
ENV SQLX_OFFLINE=true
|
||||
|
||||
@@ -6,6 +6,8 @@ RUN apt-get update && apt-get install -y \
|
||||
pkg-config \
|
||||
libssl-dev \
|
||||
protobuf-compiler \
|
||||
perl \
|
||||
make \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /build
|
||||
@@ -38,7 +40,11 @@ COPY model_loader ./model_loader
|
||||
COPY market-data ./market-data
|
||||
COPY database ./database
|
||||
COPY config ./config
|
||||
COPY web-gateway ./web-gateway
|
||||
COPY ctrader-openapi ./ctrader-openapi
|
||||
COPY foxhunt-deploy ./foxhunt-deploy
|
||||
COPY services/backtesting_service ./services/backtesting_service
|
||||
COPY services/broker_gateway_service ./services/broker_gateway_service
|
||||
COPY services/trading_service ./services/trading_service
|
||||
COPY services/ml_training_service ./services/ml_training_service
|
||||
COPY services/data_acquisition_service ./services/data_acquisition_service
|
||||
@@ -48,7 +54,6 @@ COPY services/load_tests ./services/load_tests
|
||||
COPY services/stress_tests ./services/stress_tests
|
||||
COPY services/integration_tests ./services/integration_tests
|
||||
COPY tests ./tests
|
||||
COPY migrations ./migrations
|
||||
|
||||
# Enable sqlx offline mode to use cached query metadata
|
||||
ENV SQLX_OFFLINE=true
|
||||
|
||||
@@ -11,6 +11,8 @@ RUN apt-get update && apt-get install -y \
|
||||
pkg-config \
|
||||
libssl-dev \
|
||||
protobuf-compiler \
|
||||
perl \
|
||||
make \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory
|
||||
@@ -24,6 +26,9 @@ ENV CUDA_COMPUTE_CAP=86
|
||||
# Copy workspace manifests
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
|
||||
# Copy sqlx offline cache for compile-time query verification
|
||||
COPY .sqlx ./.sqlx
|
||||
|
||||
# Copy workspace members to satisfy manifest dependencies
|
||||
COPY trading_engine ./trading_engine
|
||||
COPY risk ./risk
|
||||
@@ -41,7 +46,11 @@ COPY model_loader ./model_loader
|
||||
COPY market-data ./market-data
|
||||
COPY database ./database
|
||||
COPY config ./config
|
||||
COPY web-gateway ./web-gateway
|
||||
COPY ctrader-openapi ./ctrader-openapi
|
||||
COPY foxhunt-deploy ./foxhunt-deploy
|
||||
COPY services/backtesting_service ./services/backtesting_service
|
||||
COPY services/broker_gateway_service ./services/broker_gateway_service
|
||||
COPY services/trading_service ./services/trading_service
|
||||
COPY services/ml_training_service ./services/ml_training_service
|
||||
COPY services/data_acquisition_service ./services/data_acquisition_service
|
||||
@@ -51,7 +60,9 @@ COPY services/load_tests ./services/load_tests
|
||||
COPY services/stress_tests ./services/stress_tests
|
||||
COPY services/integration_tests ./services/integration_tests
|
||||
COPY tests ./tests
|
||||
COPY migrations ./migrations
|
||||
|
||||
# Enable sqlx offline mode to use cached query metadata
|
||||
ENV SQLX_OFFLINE=true
|
||||
|
||||
# Build the application
|
||||
RUN cargo build --release -p trading_service
|
||||
|
||||
Reference in New Issue
Block a user