Files
Mikhail Lobanov 222ae06b87
CI / smoke-test (push) Successful in 55s
Add Docker healthcheck
2026-10-15 00:21:49 +03:00

29 lines
566 B
YAML

services:
app:
image: ${IMAGE:-mikhaillobanov/devops-platform:latest}
container_name: devops-platform
restart: unless-stopped
ports:
- "127.0.0.1:8000:8000"
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
mem_limit: 256m
cpus: 0.5
healthcheck:
test:
- CMD
- python
- -c
- "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=2)"
interval: 30s
timeout: 3s
retries: 3
start_period: 5s