Files
openbb-invest-api/Dockerfile
Yaojia Wang f5b22deec3
All checks were successful
continuous-integration/drone/push Build is passing
fix: resolve curl_cffi TLS errors and fix FRED/upgrades endpoints
- Pin curl_cffi==0.7.4 to avoid BoringSSL bug in 0.12-0.14
- Patch curl_cffi Session to use safari TLS fingerprint instead of
  chrome, which triggers SSL_ERROR_SYSCALL on some networks
- Register FRED API key with OpenBB credentials at startup
- Fix macro overview to return latest data instead of oldest, and
  extract values by FRED series ID key
- Replace Finnhub upgrades endpoint (premium-only) with yfinance
  upgrades_downgrades which includes price target changes
- Remove redundant curl_cffi upgrade from Dockerfile
2026-03-19 15:40:41 +01:00

29 lines
779 B
Docker

FROM python:3.12-slim AS base
WORKDIR /app
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc g++ libssl-dev \
ca-certificates curl libnss3 libssl3 && \
rm -rf /var/lib/apt/lists/*
COPY pyproject.toml ./
RUN pip install --no-cache-dir . && \
pip install --no-cache-dir openbb-quantitative openbb-econometrics openbb-technical && \
apt-get purge -y gcc g++ libssl-dev && \
apt-get autoremove -y
COPY *.py ./
RUN useradd -m -s /bin/bash appuser && \
mkdir -p /home/appuser/.openbb_platform && \
chown -R appuser:appuser /home/appuser && \
chown -R appuser:appuser /usr/local/lib/python3.12/site-packages/openbb
EXPOSE 8000
USER appuser
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]