page:guides:gin:configuration secrets

Configure environment and secrets for Gin

Summary

Configuration and secrets for a Gin app on Ample. Verified on Gin: an --env value delivered encrypted and reported as present without being echoed (secret=set). Build and start: CGO_ENABLED=0 go build -o app ./... then ./app on the ubuntu-24.04 template (go.sum committed for a reproducible build).

Prerequisites

Tested Configuration

Input Schema

Workflow Steps

  1. Build and start
    CGO_ENABLED=0 go build -o app ./... then ./app on the ubuntu-24.04 template (go.sum committed for a reproducible build); the server must bind 0.0.0.0 on PORT.
  2. Pass values on deploy
    Use --env KEY=value (repeatable) or --env-file; values are encrypted at rest and reused on redeploys. Declare names only in ample.toml.
    Command: ample deploy . --name --public --env MY_SECRET=...
  3. Verify
    Fetch the live URL and /p/configuration-secrets on the example; on failure read the build and runtime logs.
    Command: ample logs --kind build

Examples

Success Checks

Limitations

Cost Estimate

Components:

Evidence Summary

Formats

Next Actions

  1. Browse the catalog index
  2. Search published recipes by intent, stack and constraints
  3. Prepare a side-effect-free deployment plan for an authorized project
  4. Read the existing agent authentication setup
  5. Browse Gin
  6. Browse Configure deployment
  7. **Browse Public web service