forked from crisng95/flowkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 767 Bytes
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 767 Bytes
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
27
28
29
30
31
32
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
FLOW_AGENT_DIR=/app/runtime \
API_HOST=0.0.0.0 \
API_PORT=8100 \
WS_HOST=0.0.0.0 \
WS_PORT=9222
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg build-essential \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install --upgrade pip \
&& pip install -r requirements.txt
COPY . .
RUN mkdir -p /app/runtime
EXPOSE 8100 9222
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=5 \
CMD python -c "import sys, urllib.request; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8100/health').status == 200 else 1)"
CMD ["python", "-m", "agent.main"]