feat: add containerized FastAPI health check

This commit is contained in:
bot
2026-08-11 14:44:59 +03:00
parent fea8ca89f8
commit f7e668d692
10 changed files with 167 additions and 2 deletions
+45
View File
@@ -0,0 +1,45 @@
services:
web:
build:
context: .
target: runtime
image: media-ingest:local
init: true
ports:
- "127.0.0.1:8000:8000"
healthcheck:
test:
- CMD
- python
- -c
- >-
import urllib.request;
urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=2)
interval: 10s
timeout: 3s
retries: 3
start_period: 5s
read_only: true
tmpfs:
- /tmp:size=64m,mode=1777
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
restart: unless-stopped
test:
profiles:
- test
build:
context: .
target: test
image: media-ingest-test:local
init: true
read_only: true
tmpfs:
- /tmp:size=64m,mode=1777
security_opt:
- no-new-privileges:true
cap_drop:
- ALL