DNS Handling ships a multi-stageDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/plutoploy/dns-handling/llms.txt
Use this file to discover all available pages before exploring further.
Containerfile that produces a minimal Alpine-based image. You can build and run it with any OCI-compatible tool — Docker and Podman both work with the same commands. For teams that use GitHub Actions, a ready-made workflow builds with Buildah and pushes the image to the GitHub Container Registry on every push.
Building the container image
From the repository root, build the image with Podman or Docker:Containerfile used by the build is:
CGO_ENABLED=0. The second stage copies only the compiled binary and the CA certificate bundle into a clean Alpine image, keeping the final image small and free of build tooling.
The binary inside the container is named
tls-server and is installed at
/usr/local/bin/tls-server. The container’s ENTRYPOINT invokes it directly,
so there is no shell wrapper between the process supervisor and the Go binary.Running the container
The service reads all configuration from environment variables. Pass them with one or more-e flags, or point to an env file with --env-file:
-p <host-port>:8080.
Environment variables reference
All variables are optional — the values below are the compiled-in defaults. Override only what differs in your environment.| Variable | Default | Description |
|---|---|---|
DATABASE_URL | file:./tls.db | LibSQL connection string. Use a file path for local dev or a Turso remote URL for production. |
ACME_EMAIL | admin@example.com | Email registered with the ACME provider; used for expiry notifications. |
ACME_DIRECTORY | https://acme-staging-v02.api.letsencrypt.org/directory | ACME directory endpoint. Change to the production URL when ready. |
SERVER_ADDR | :8080 | host:port the HTTP server binds to. |
LOG_LEVEL | info | Set to debug for verbose development logging. |
GitHub Actions CI: build and push to GHCR
The repository includes.github/workflows/build.yaml, which runs on every push and on manual dispatch. It builds the image with Buildah, logs in to the GitHub Container Registry, and pushes to:
latest, the full commit SHA (github.sha), and the branch or tag name (github.ref_name). After the push, the workflow generates a signed build-provenance attestation via actions/attest-build-provenance, which allows consumers to verify the image was built from a specific commit in the repository.
To pull the latest image from GHCR:
Health check and readiness
The service does not expose a dedicated health endpoint. Instead, treat the structured log line below as the readiness signal — it is emitted by the server goroutine immediately before it begins accepting connections:"listening" message.
On shutdown (SIGINT or SIGTERM), the service emits "shutting down...", drains in-flight requests with a 30-second grace period, and then logs "stopped" before the process exits.