feat: add container restart storage test
This commit is contained in:
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM python:3.10-slim
|
||||
|
||||
WORKDIR /app
|
||||
COPY test_restart.py /app/test_restart.py
|
||||
|
||||
ENV PORT=8080
|
||||
ENV RUN_SECONDS=60
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK --interval=10s --timeout=3s --start-period=3s --retries=3 \
|
||||
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health', timeout=2)" || exit 1
|
||||
|
||||
CMD ["python", "/app/test_restart.py"]
|
||||
Reference in New Issue
Block a user