- Dockerfile 53.7%
- Go 46.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| cmd/gateway | ||
| config | ||
| deploy | ||
| .dockerignore | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .releaserc.yml | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
gomodel-dist
A GoModel distribution with the plugins from gomodel-plugins compiled in: the stock binary, API, dashboard, and providers plus the registered plugins and rewriters.
Plugin behavior and configuration are documented in the
gomodel-plugins README. This
repository pins the plugin version, wires it into cmd/gateway, and ships
the image.
Run from source
go run ./cmd/gateway
go.mod pins the plugin module, which resolves from git.chaops.de; no
local checkout is needed. Verify the plugins loaded:
curl -s http://localhost:8080/admin/plugins | jq .
config/config.yaml is the example configuration and is baked into the
image as defaults. Keep secrets in the environment (GOMODEL_MASTER_KEY,
OPENAI_API_KEY, ...); CONFIG_STRICT=true (default) rejects unknown
config keys at startup.
Container image
The Dockerfile packages a prebuilt binary:
CGO_ENABLED=0 go build -trimpath -o gomodel ./cmd/gateway
podman build -f deploy/Dockerfile -t gomodel-dist .
podman run --rm -p 8080:8080 \
-e GOMODEL_MASTER_KEY=change-me \
gomodel-dist
Mount your configuration at /app/config/config.yaml to override the
defaults.
Releases
The image is built on every branch and pull request and pushed for main
(tags main and the commit SHA) and for v*.*.* tags (tags v<version>,
<major>.<minor>, and the commit SHA).
main is released with semantic-release (.releaserc.yml): fix: bumps
the patch version, feat: the minor, feat!: (or a BREAKING CHANGE:
footer) the major. The release tag starts its own run, which pushes the
versioned image.
The image ships the GoModel and plugin versions pinned in go.mod; tag the
plugin before bumping its pin. The workflow needs a FORGEJO_TOKEN secret
with package write access for the registry.
Development
go build ./...
go vet ./...
prek run --all-files
License
MIT