Files
ai-exchange/Dockerfile
T

30 lines
792 B
Docker

FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app
WORKDIR /app
COPY pyproject.toml /app/pyproject.toml
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir \
"sqlalchemy>=2.0" \
"psycopg[binary]>=3.1" \
"pydantic>=2.7" \
"pydantic-settings>=2.2" \
"httpx>=0.27"
COPY src /app/src
COPY scripts /app/scripts
COPY migrations /app/migrations
COPY src/web /app/src/web
COPY .env.example /app/.env.example
COPY README.md /app/README.md
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD python -c "from urllib.request import urlopen; import sys; sys.exit(0 if urlopen('http://127.0.0.1:8000/health').status == 200 else 1)"
CMD ["python", "scripts/run_api_server.py"]