You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 81bdc70
Browse filesBrowse the repository at this point in the historyBrowse files
Docs: update AGENTS, CONTRIBUTING, and the templates (#372)
* Docs: update AGENTS, CONTRIBUTING, and the templates
* Template: keep two database health check rules
CONTRIBUTING.md now points to the template comments for the database case. Two rules from the removed paragraph were missing there: a database image's own HEALTHCHECK comes first, and a service that depends on the database waits with condition: service_healthy.
* Docs: say how to validate the template
The documented validation command fails on the template, because SERVICE and IMAGE_URL are empty there. AGENTS.md and CONTRIBUTING.md now give the command with dummy values, as CI uses.
* Template: give a tagged image as the example
CONTRIBUTING.md asks for an explicit image tag, but the example in the template had none and misspelled the image name.
* Docs: scope the rules to new and changed parts, name rumdl without a version number
The rules apply to new stacks and to the parts of an existing stack that a change touches, so existing stacks that differ are not violations to fix at once. The lint instructions read the rumdl version from linting.yml and offer the release binary next to uvx, so a version bump needs no doc edit.
* Docs: name the upstream branch for forks, and the .gitignore exception
git diff --check origin/main compares with the wrong branch in a fork. A tracked file inside a data folder needs its own exception in .gitignore, because the folder rules ignore it.
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Servicename: context
2
-
<!-- Examples: Dockhand: new service | Changedetection: fix port mapping -->
2
+
<!--Title format: "Service: what changes", as in CONTRIBUTING.md. Examples: Dockhand: new service | Changedetection: fix port mapping -->
3
3
4
4
## Description
5
5
<!-- Briefly describe what changed. -->
@@ -17,7 +17,9 @@
17
17
-[ ] I have performed a self-review of my code and followed the [templates](https://github.com/tailscale-dev/ScaleTail/tree/main/templates/service-template) structure.
18
18
-[ ] I have added verification that the stack works as expected.
19
19
-[ ] I have updated necessary documentation (e.g. frontpage [README.md](https://github.com/tailscale-dev/ScaleTail/blob/main/README.md) ).
20
-
-[ ] I have selected the correct label(s) for this PR.
20
+
-[ ] I ran Compose validation with dummy values for required variables.
21
+
-[ ] I ran rumdl on the whole repository.
22
+
-[ ] I committed no working credential.
21
23
22
24
## Additional Context
23
25
<!-- Any extra info for reviewers, such as gotchas, special requirements, devices, or dependencies. Use "None" if not applicable. -->
Follow [CONTRIBUTING.md](CONTRIBUTING.md) and the current service template.
3
+
ScaleTail is a collection of Docker Compose stacks. Each directory in `services/` is one stack, which usually runs a self-hosted application behind a Tailscale sidecar container.
4
+
5
+
## Where the rules live
6
+
7
+
-[CONTRIBUTING.md](CONTRIBUTING.md): how to add, update, verify, and submit a service. Follow it.
8
+
-[templates/service-template/](templates/service-template/): the starting point for every service. Its comments explain each setting.
9
+
-[documentation/standard-setup.md](documentation/standard-setup.md): the shared setup. A service README lists only what differs, under "Deviations from the standard setup".
10
+
-[.github/workflows/](.github/workflows/): the Compose validation and Markdown lint that CI runs.
4
11
5
12
## Before you edit
6
13
7
-
-Inspect the target service and its README.
8
-
- Confirm ports, commands, volumes, and variables in the image's upstream docs.
9
-
- Preserve service-specific exceptions that still apply.
14
+
-Read the service's `compose.yaml`, `.env`, and README, including "Deviations from the standard setup".
15
+
- Confirm ports, commands, volumes, variables, and health checks in the image's upstream docs.
16
+
- Preserve documented exceptions. Some stacks use other Compose service keys or container names, and other containers or `.env` values refer to those names.
10
17
- Keep changes focused on the requested service or documentation.
11
-
- Never commit working auth keys, passwords, tokens, or other credentials.
18
+
- Apply the rules to new stacks and to the parts of an existing stack that you change. Existing stacks are brought in line over time, so do not fix the rest of a stack unless that is the task.
19
+
20
+
## Files that change together
21
+
22
+
- Add, rename, or remove a service: the `services/<name>/` directory and its row in the root `README.md`. Insert a new row in alphabetical order by the bold name, and leave the other rows alone.
23
+
- Make existing users act, such as with a new required secret, a moved volume, or a changed `SERVICE`: add an "Upgrading" section to the service README. `SERVICE` also names the Tailnet device, the containers, and most data folders.
24
+
- Change the template: also update `documentation/standard-setup.md` and `CONTRIBUTING.md` where they describe the same setting. Validate it from `templates/service-template/` with `SERVICE=dummy IMAGE_URL=dummy docker compose config --quiet`, because the template leaves both values empty.
25
+
26
+
## Secrets and local data
27
+
28
+
- Every `.env` file is tracked and published. Never commit an auth key, password, token, or other credential.
29
+
- Leave each secret empty in `.env`. When the stack cannot start without it, read it in `compose.yaml` as `${VAR:?Set VAR in .env}`, and add a `# Required:` comment above it in `.env` that says what to set, such as how to generate it. Keep `TS_AUTHKEY` optional, because only the first start needs it.
30
+
- Start test stacks from a copy outside the repository, such as `cp -R services/<name> /tmp/<name>`, and put real values only in the copy. A running stack writes `./config`, `./ts/state` (with the device key), and its data folders next to `compose.yaml`.
31
+
- Before you commit, run `git status` and stage only the files you meant to change.
12
32
13
33
## Verification
14
34
15
-
Run `docker compose config --quiet` from each changed service directory. When
16
-
possible, start the stack and test its main function through the Tailnet.
35
+
From each changed service directory, validate Compose. The command gives each required variable a dummy value, as CI does, so you do not edit `.env`:
17
36
18
-
From the repository root, lint the changed Markdown files. Replace the example paths below as needed:
It must exit with status 0. CI fails on "variable is not set" warnings.
42
+
43
+
From the repository root, lint all Markdown with the rumdl version that `.github/workflows/linting.yml` pins in its `version:` input, and check your changes for whitespace errors:
Report the checks you ran. State any checks that credentials, hardware,
26
-
permissions, or unavailable tools prevented.
51
+
Without `uv`, download that version from the [rumdl releases](https://github.com/rvben/rumdl/releases) and run `rumdl check --config .markdownlint.yml .`.
52
+
53
+
Lint the whole tree, because renaming a service breaks a link in the root `README.md`. `git diff --check origin/main` also covers staged and committed changes, but not untracked files, so stage new files first. In a fork, compare with the `main` branch of this repository instead, for example `upstream/main`.
54
+
55
+
When you have an auth key, start the copied stack and test its main function through the Tailnet. Run each health check command in its container with `docker exec`.
56
+
57
+
Report the checks you ran. State any checks that credentials, hardware, permissions, or unavailable tools prevented.
58
+
59
+
## Pull requests
60
+
61
+
- Title the pull request `Service: what changes`, such as `Umami: new service`. For several services, list them or use `All services:`. For other areas, use `CI:`, `Docs:`, or `Template:`.
62
+
- Fill in the [pull request template](.github/PULL_REQUEST_TEMPLATE.md). Maintainers apply the labels.
0 commit comments