- Never commit
GIT_TOKENor private credentials into source control. - Inject credentials at runtime through secret managers or orchestrator-native secrets.
- Avoid plaintext secrets inside compose files whenever possible.
For mode=git with private repos:
- provide
GIT_USERNAME - provide
GIT_TOKEN - keep token scope minimal (read-only if possible)
- Run with explicit image tag/version, not floating
latest. - Restrict outbound network where feasible.
- Limit container privileges and filesystem write scope.
- Add health checks using
/functions-health. - Capture logs centrally and redact sensitive values.
- Keep startup mode explicit (
MODE=git|npm|url). - Validate required env vars before release rollout.
- Monitor restart loops and startup errors in container logs.
- Use rollout strategy that supports rollback (blue/green or canary where possible).
- Check container logs for mode-specific errors (
GIT_CLONE_URL,NPM_TAR,URL_TAR). - Verify
/functions-healthresponds. - Check
/functions-allto confirm descriptor discovery. - Verify networking/ingress and port mapping (
PORT, service target port). - Roll back image/env to last known good deployment if needed.