Repo Template¶
be-template keeps shared files (CI/CD workflows, build props, editor configs, Renovate config, etc.) in sync across all backend repos using Copier.
How it works¶
- A change is made to
be-templatevia a normal PR. - On merge, a workflow applies the template to all adopted repos and opens PRs similar to Renovate.
- If the PR is clean and green it auto-merges. If it conflicts or fails, you need to resolve it manually.
Each repo stores its parameters (service name, DB name, etc.) in .copier-answers.yml. Avoid editing template-managed files unless there's a special requirement that cannot be handled otherwise since manual edit will prevent future update from the template to be applied cleanly.
Manual usage¶
If on Windows, enable long paths to avoid path length issues (from a powershell prompt as administrator):
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
# Adopt the template in a new or existing repo
copier copy gh:majority-dev/be-template --trust /path/to/repo
# Update to the latest template version
copier update
See the be-template README for the full variable reference and project scaffolding commands.