44# C2: added healthcheck on backend — frontend waits for FastAPI to be ready
55# before nginx starts proxying, preventing 502 on first page load
66# C3: use python urllib for healthcheck — curl not present in python:3.10-slim
7- # C4: increased healthcheck interval 10s→ 30s — 10s was generating excessive
7+ # C4: increased healthcheck interval 10s-> 30s — 10s was generating excessive
88# uvicorn access log noise with no operational benefit post-startup
9+ # Platform fix:
10+ # Added platform: linux/arm64 — ensures native execution on Apple Silicon / ARM hosts
11+ # without QEMU emulation, preventing container crash-loop (exit 255)
912
1013services :
1114 backend :
12- build : ./backend
15+ image : ghcr.io/tosumitdhaka/trishul-snmp-backend:latest
16+ platform : linux/arm64
1317 container_name : trishul-snmp-backend
1418 env_file :
1519 - .env
@@ -38,8 +42,6 @@ services:
3842 # Auto-Start flags (Part A)
3943 - AUTO_START_SIMULATOR=${AUTO_START_SIMULATOR:-true}
4044 - AUTO_START_TRAP_RECEIVER=${AUTO_START_TRAP_RECEIVER:-true}
41- # C2/C3/C4: healthcheck using python stdlib — no curl needed in slim image.
42- # interval: 30s is plenty for a running container; start_period handles startup.
4345 healthcheck :
4446 test : ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"]
4547 interval : 30s
@@ -49,11 +51,11 @@ services:
4951 restart : always
5052
5153 frontend :
52- build : ./frontend
54+ image : ghcr.io/tosumitdhaka/trishul-snmp-frontend:latest
55+ platform : linux/arm64
5356 container_name : trishul-snmp-frontend
5457 ports :
5558 - " 8080:80"
56- # C2: wait for backend to pass healthcheck before starting nginx
5759 depends_on :
5860 backend :
5961 condition : service_healthy
0 commit comments