Files
aisp-ci-demo/README.md
Linh Ha fdb7ee666d 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.
2026-10-23 08:50:10 +00:00

15 lines
692 B
Markdown

# aisp-ci-demo
Service mẫu để thử luồng Gitea CI của AISP: kết nối repository → scan Dockerfile → build →
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 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`