chore: update templates (backend v0.4.0 → v0.6.0, caddy v0.1.2 → v0.1.4, frontend v0.4.2 → v0.6.0, infra v0.5.0 → v0.6.0) #14

Closed
renovate Bot wants to merge 7 commits from templates/update into dev
pull from: templates/update
3 changed files with 3 additions and 22 deletions
Showing only changes of commit fd429dd851 - Show all commits

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
_commit: v0.1.2 _commit: v0.1.4
_src_path: https://git.kotikot.com/templates/caddy.git _src_path: https://git.kotikot.com/templates/caddy.git
project_slug: beavergram project_slug: beavergram
routes: routes:
+1 -1
View File
@@ -1,2 +1,2 @@
.env .env
Caddyfile /Caddyfile
+1 -20
View File
@@ -1,22 +1,3 @@
# caddy # caddy
`site.caddy` routes `{$BEAVERGRAM_DOMAIN}` to the project's services over the external `caddy` docker network. It works standalone and inside a shared Caddy that fronts several projects. `site.caddy` routes `{$BEAVERGRAM_DOMAIN}` to the project over the external `caddy` network. In a shared Caddy, mount this directory as `/etc/caddy/projects.d/beavergram:ro` and set `BEAVERGRAM_DOMAIN`. Keep it portable: domain only from the env, no `tls`, snippets prefixed with `beavergram_`.
Standalone:
```sh
docker network create caddy
cp Caddyfile.example Caddyfile
cp .env.example .env
docker compose up -d
```
Shared Caddy: mount this directory as `/etc/caddy/projects.d/beavergram:ro`, keep `import /etc/caddy/projects.d/*/site.caddy` in its Caddyfile and put `BEAVERGRAM_DOMAIN` in its environment.
Rules that keep `site.caddy` portable:
- the domain comes only from the environment variable
- no `tls` block, certificates are configured by the host Caddy (`acme_dns cloudflare {env.CLOUDFLARE_API_TOKEN}` in the global block)
- snippets are prefixed with the project slug because Caddy snippets are global
- mount the directory, not the file: a single-file bind mount goes stale when git replaces the inode
- keep `admin localhost:2019`, `admin off` makes `caddy reload` impossible