Switch demo service to a Go binary on scratch
The python:3.12-slim base pushed a 30 MB layer that timed out on the way to Harbor (Cloudflare 524). A static Go binary keeps the image near 5 MB with the same endpoints, port and APP_MESSAGE variable.
This commit is contained in:
@@ -6,8 +6,9 @@ Release → deploy.
|
||||
- `GET /` trả JSON gồm `version`, `message` (từ biến `APP_MESSAGE`) và hostname của Pod.
|
||||
- `GET /healthz` dùng cho readiness check.
|
||||
- Lắng nghe cổng `8080`, chạy non-root (UID 10001).
|
||||
- Viết bằng Go, image cuối là `scratch` chỉ vài MB để push lên Harbor nhanh.
|
||||
|
||||
Thử thay đổi: sửa `VERSION` trong `app.py`, commit và push, rồi build lại trên console để thấy
|
||||
Thử thay đổi: sửa hằng `version` trong `main.go`, commit và push, rồi build lại trên console để thấy
|
||||
phiên bản mới sau khi deploy.
|
||||
|
||||
Chạy local: `docker build -t aisp-ci-demo . && docker run --rm -p 8080:8080 aisp-ci-demo`
|
||||
|
||||
Reference in New Issue
Block a user