| FROM python:3.10-slim |
|
|
| |
| WORKDIR /app |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| gcc \ |
| g++ \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| COPY crypto_data_bank/requirements.txt /app/requirements.txt |
|
|
| |
| RUN pip install --no-cache-dir --upgrade pip && \ |
| pip install --no-cache-dir -r requirements.txt |
|
|
| |
| COPY crypto_data_bank/ /app/ |
|
|
| |
| RUN mkdir -p /app/data |
|
|
| |
| ENV PYTHONUNBUFFERED=1 |
| ENV PORT=8888 |
|
|
| |
| EXPOSE 8888 |
|
|
| |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ |
| CMD python -c "import httpx; httpx.get('http://localhost:8888/api/health')" || exit 1 |
|
|
| |
| CMD ["python", "-u", "api_gateway.py"] |
|
|