Docker & Kubernetes
Official naati images are published on ghcr.io/malotho/naati for linux/amd64 and linux/arm64, mirroring the official nginx container layout.
Container Layout
| Path / Behavior | Value |
|---|---|
| Binary & compat symlink | /usr/sbin/naati and /usr/sbin/nginx -> /usr/sbin/naati |
| Config paths | /etc/nginx/nginx.conf, /etc/nginx/conf.d/*.conf |
| Startup templates | /etc/nginx/templates/*.template (envsubst) |
| Entrypoint hooks | /docker-entrypoint.d/*.sh and *.envsh |
| Logs | /var/log/nginx/access.log -> /dev/stdout, error.log -> /dev/stderr |
| Graceful stop | STOPSIGNAL SIGQUIT |
Dynamic Config Templates
Mount *.template files into /etc/nginx/templates/ and naati renders them into /etc/nginx/conf.d/ before starting:
# templates/default.conf.template
server {
listen 80;
location / {
proxy_pass http://${UPSTREAM_HOST}:${UPSTREAM_PORT};
}
}Kubernetes Deployment (Unprivileged + Cgroup Auto-Tune)
apiVersion: apps/v1
kind: Deployment
metadata:
name: naati-edge
spec:
replicas: 3
selector:
matchLabels:
app: naati-edge
template:
metadata:
labels:
app: naati-edge
spec:
containers:
- name: naati
image: ghcr.io/malotho/naati:unprivileged
ports:
- containerPort: 8080
env:
- name: NAATI_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE
value: "1"
resources:
limits:
cpu: "2"
memory: 256Mi
securityContext:
runAsNonRoot: true
runAsUser: 101
allowPrivilegeEscalation: false
readinessProbe:
httpGet:
path: /healthz # adjust to match a health endpoint in your config
port: 8080
periodSeconds: 5
lifecycle:
preStop:
exec:
command: ["/usr/sbin/naati", "-s", "quit"]