File size: 583 Bytes
f1378d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM python:3.11-slim

RUN apt-get update && apt-get install -y --no-install-recommends curl libpq-dev && rm -rf /var/lib/apt/lists/*

WORKDIR /app

RUN pip install \
    fastapi>=0.104.0 \
    uvicorn>=0.24.0 \
    pydantic>=2.0 \
    requests>=2.31.0 \
    psycopg2-binary>=2.9.0

COPY manager/ /app/manager/
COPY entrypoint.sh /app/

RUN mkdir -p /tmp/data && chmod -R 777 /tmp
RUN chmod +x /app/entrypoint.sh

HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
    CMD curl -f http://localhost:7860/health || exit 1

EXPOSE 7860

CMD ["/app/entrypoint.sh"]