Expand description
Project scaffolding for edgeguard init.
The first five minutes decide whether someone adopts a front door for their (often
generated) app. init removes the “read the whole README, hand-write a config and a
Dockerfile” step: it detects the upstream app’s runtime from the files in the working
directory and renders a starter edgeguard.toml plus a Dockerfile that wraps the app
behind EdgeGuard with --wrap.
This module is the pure core (detection + templating) so it’s unit-testable; the CLI in
main.rs does the filesystem side (scan the directory, write the files, print next steps).
Enums§
- Runtime
- A detected upstream-app runtime. Drives the default app port, the
--wrapstart command, and the base image in the generated Dockerfile.
Constants§
- EDGEGUARD_
TOML - The annotated, secure-by-default config reference, embedded at compile time so the scaffold
edgeguard.tomlis byte-identical to the documented reference and can never drift from it.
Functions§
- dockerfile
- Render a
Dockerfilethat wraps the detected app behind EdgeGuard: it copies the staticedgeguardbinary from the published image, keeps the app’s own base image, and makes EdgeGuard the entrypoint (binding the platform$PORT, running the app onAPP_PORT). - next_
steps - The next-steps blurb printed after
initwrites its files: how to set a credential and run.