Files
infra/template/{% if layout == 'parts' %}README.md{% endif %}.jinja
T
2026-09-09 00:37:04 +02:00

17 lines
1.3 KiB
Django/Jinja

# {{ project_name }}
{% if project_description and project_description != project_name %}
{{ project_description }}
{% endif %}
Runs in Docker, locally the same way as in production. Each part in `{{ parts | join('/`, `') }}/` brings its own `docker-compose.yml`, included from the root one. `COMPOSE_PROFILES` in `.env` selects the services that run on this machine. `docker-compose.override.yml` in each part holds what differs between machines: published ports and the aliases on the external `caddy` network.
```sh
make env
make recreate
```
`make env` creates `.env` from the examples of every part and copies each `docker-compose.override.yml.example`. `make recreate` starts the selected profiles, `make rebuild` builds the images first, `make logs`, `make restart` and `make down` do what they say.
To deploy, `git pull && make deploy`. It runs `make pre-deploy` in every part, which builds images only when their inputs changed and applies migrations, then `docker compose up -d`, then `make post-deploy`, which restarts the services whose mounted code changed. A deploy system with its own `up` step calls the two hooks around it. What was built and started is remembered as `refs/deploy/*` in the clone.
`make fmt`, `make check` and `make build` run in every part. Part-specific targets live in the part's own Makefile: `make -C {{ parts[0] }} ...`.