- Shell 85%
- Dockerfile 15%
|
All checks were successful
Build and Push Image / build-and-push (push) Successful in 1m44s
Sites may wish to have nonstandard paths included in their builds. If a site checks in a newline-delimited file of paths titled .include, br will copy each path relative to the project root to the live site. |
||
|---|---|---|
| .forgejo/workflows | ||
| etc | ||
| latest | ||
| testdata | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
Background Radiation
Background Radiation, or BakRad, or br is a bespoke build system for static sites. I use it to automate deployment of the various static sites I run with Caddy.
Usage
Run the container, ensuring you have mounted a config file to /etc/bakrad/config. The config file is a plaintext, newline delimited list of HTTPS links to Git repositories containing your site.
BakRad functions using Git tags, it will only update a site when it detects a change in tag since the last run (tags are cached at /var/bakrad/tags).
If the script detects a ts/ or scss/ directory is present within the Git repository, it will compile files using the respective compiler.
Ensure the root folder for your production sites is mounted at /srv/www/, which is where BakRad will place updated sites.
Your site may optionally supply a .include file at the root of the project, which is a newline delimited file listing additional paths BakRad should copy to the live site. See the Beer4Kids repository for an example.
docker run \
--rm \
--tty \ # Allocate pseudo-tty for log colors
-v /etc/opt/slapshit/bakrad:/etc/bakrad \
-v /srv/www:/srv/www/ \
-v /var/opt/slapshit/bakrad:/var/cache/bakrad \
bakrad
$ cat /etc/opt/slapshit/bakrad/config
https://slapshit.net/SCROTEGANG/scrote.gay
...