ETF_Suite_Portal/Dockerfile

37 lines
917 B
Docker

FROM python:3.8-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir yfinance>=0.2.36
# Copy the rest of the application
COPY . .
# Install the ETF Suite CLI
RUN pip install -e .
# Expose the port
EXPOSE 8500
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV STREAMLIT_SERVER_PORT=8500
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
ENV STREAMLIT_SERVER_ENABLE_CORS=true
ENV STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false
# Command to run the application
CMD ["streamlit", "run", "ETF_Suite_Launcher.py", "--server.port=8500"]