Standalone¶
A complete Gradient on one machine for trying Gradient on a personal repository. Server, web UI, PostgreSQL and a worker share one container or VM.
Requirements:
1. Start Gradient¶
docker run -dt --name gradient \
--privileged --cgroupns=host \
-p 127.0.0.1:8080:80 \
-v gradient:/var/lib \
ghcr.io/wavelens/gradient-standalone
Systemd and the Nix build sandbox both run inside the container. Both need --privileged. -t will give systemd a console for docker logs. The port is open on 127.0.0.1 only. The gradient volume will keep projects, the cache and every build across restarts.
Image Provenance
Release images come with a signed build provenance and an SBOM. The GitHub CLI can check the provenance against the repository.
The first boot will take a minute. PostgreSQL will initialize, and Gradient will generate its secrets.
2. Log In¶
Gradient will generate a random admin password on first boot. Every boot will print the password in this line.
Open http://localhost:8080 and log in as admin. Self-registration is disabled.
3. Build a Repository¶
Follow First Project from step 2 for a cache, a project and a task. The worker inside the standalone instance will join every new project on its own.
Private Repositories
Add the project's public SSH key from Settings -> SSH Key as a deploy key on the Git host.
Verify Deployment¶
http://localhost:8080shows the login page.- The builds show as completed on the evaluation page after the first evaluation.
Upgrade¶
Warning
The standalone instance has plain HTTP, a single worker and no backups. Deploy with the NixOS module from the Quick Start for a team.
Next Steps¶
- First Project: a cache, a project and the first green build
- Quick Start: NixOS deployment with TLS
- Remote Worker: more build capacity
- Share a Cache: build outputs on other machines