File size: 401 Bytes
67ad5f6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.12-slim

WORKDIR /app

RUN pip install --no-cache-dir aiohttp

COPY core.py .
COPY hot_reload.py .
COPY sandbox.sh .
COPY static/ static/

RUN chmod +x sandbox.sh

EXPOSE 8765

HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
  CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8765/api/health')" || exit 1

CMD ["python", "core.py"]