chart data loading
This commit is contained in:
@@ -1,18 +1,27 @@
|
||||
# Multi-stage build for DexOrder user container
|
||||
FROM python:3.11-slim as builder
|
||||
FROM python:3.11-slim AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# Install build dependencies
|
||||
# Install build dependencies including protobuf compiler
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc \
|
||||
g++ \
|
||||
protobuf-compiler \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy dependency specifications
|
||||
COPY setup.py .
|
||||
COPY dexorder/ dexorder/
|
||||
|
||||
# Copy protobuf definitions (copied by bin/build from canonical /protobuf/)
|
||||
COPY protobuf/ protobuf/
|
||||
|
||||
# Compile protobufs to Python
|
||||
RUN mkdir -p dexorder/generated && \
|
||||
protoc --python_out=dexorder/generated --proto_path=protobuf protobuf/*.proto && \
|
||||
touch dexorder/generated/__init__.py
|
||||
|
||||
# Install dependencies to a target directory
|
||||
RUN pip install --no-cache-dir --target=/build/deps .
|
||||
|
||||
@@ -38,6 +47,9 @@ COPY --from=builder /build/deps /usr/local/lib/python3.11/site-packages/
|
||||
COPY dexorder/ /app/dexorder/
|
||||
COPY main.py /app/
|
||||
|
||||
# Copy generated protobuf code from builder
|
||||
COPY --from=builder /build/dexorder/generated/ /app/dexorder/generated/
|
||||
|
||||
# Create directories for config, secrets, and data
|
||||
RUN mkdir -p /app/config /app/secrets /app/data && \
|
||||
chown -R dexorder:dexorder /app
|
||||
|
||||
Reference in New Issue
Block a user