2 Commits
Author SHA1 Message Date
hh 1f663c8e51 Pass project name to infra, document make env 2026-09-09 00:21:28 +02:00
hh 7ff97419e3 Override-based compose, profiles in .env, README 2026-09-09 00:18:15 +02:00
2 changed files with 3 additions and 3 deletions

No files matched your search

+1 -1
View File
@@ -15,6 +15,6 @@ updateproject backend # one part
newproject ~/projects/my-thing --parts backend,frontend,caddy --backend python --frontend svelte --serve bun --defaults
```
One part alone is rendered at the root of the project; two parts live in `backend/` and `frontend/`. Templates are cloned from `https://git.kotikot.com/templates` unless `TEMPLATES_DIR` points at a directory with local checkouts; `TEMPLATES_REF=HEAD` renders their working trees instead of the latest tag.
One part alone is rendered at the root of the project; two parts live in `backend/` and `frontend/`. After rendering, `make env` creates `.env` and every `docker-compose.override.yml` from their examples. Templates are cloned from `https://git.kotikot.com/templates` unless `TEMPLATES_DIR` points at a directory with local checkouts; `TEMPLATES_REF=HEAD` renders their working trees instead of the latest tag.
Requires `uv`; `bun`, `docker` and `pre-commit` are used by the generated projects.
+2 -2
View File
@@ -76,9 +76,9 @@ def new(args: argparse.Namespace) -> None:
run_copy(template(name), dest, data=data, unsafe=True, defaults=args.defaults, vcs_ref=REF)
dest.mkdir(parents=True, exist_ok=True)
copy("infra", {"layout": "single" if single else "parts", "parts": [] if single else stack})
layout = "root" if single else "part"
identity = {"project_name": name, "project_slug": slug}
copy("infra", {"project_name": name, "layout": "single" if single else "parts", "parts": [] if single else stack})
layout = "root" if single else "part"
if backend:
copy(BACKENDS[backend], {**identity, "layout": layout, "serve_spa": serve == "api",
"author_name": git_config("user.name"), "author_email": git_config("user.email")})