24 lines
568 B
Plaintext
24 lines
568 B
Plaintext
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Python-Dependencies zuerst (bessere Layer-Cache)
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Anwendungssource
|
|
COPY trademind ./trademind
|
|
COPY config.yaml config.yaml
|
|
|
|
RUN useradd --create-home --shell /bin/bash trademind \
|
|
&& chown trademind:trademind /app
|
|
USER trademind
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
TM_CONFIG=/app/config.yaml
|
|
|
|
# Default: Paper-Modus. Für Live: TM_MODE=live
|
|
ENTRYPOINT ["python", "-m", "trademind"]
|
|
CMD ["paper", "--config", "config.yaml"]
|