Compare commits
2
Commits
3dc3a03066
..
v0.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea78a12a83 | ||
|
|
0a3511a44b |
No files matched your search
@@ -1,5 +1,5 @@
|
||||
COMPOSE := {% if layout == 'part' %}cd .. && {% endif %}docker compose
|
||||
IMAGE := {{ project_slug }}/{{ part }}
|
||||
IMAGE := {{ project_slug | replace('_', '-') }}/{{ part }}
|
||||
changed = ! git diff --quiet $(1) -- $(2) 2>/dev/null
|
||||
stamp = { git update-ref $(1) HEAD 2>/dev/null || true; }
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
services:
|
||||
{{ service }}:
|
||||
build: {{ part_dir }}
|
||||
image: {{ project_slug }}/{{ part }}
|
||||
image: {{ project_slug | replace('_', '-') }}/{{ part }}
|
||||
profiles: [{{ service }}, services]
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
|
||||
@@ -10,3 +10,5 @@ make recreate
|
||||
`make env` creates `.env` and `docker-compose.override.yml` from their examples. `make recreate` starts the selected profiles, `make rebuild` builds the image first, `make logs`, `make restart` and `make down` do what they say.
|
||||
|
||||
To deploy, `git pull && make deploy`. It runs `make pre-deploy`, which rebuilds the image only when something in the repository changed, then `docker compose up -d`. A deploy system with its own `up` step calls `make pre-deploy` before it and `make post-deploy` after. What was built is remembered as `refs/deploy/*` in the clone.
|
||||
|
||||
In the fleet, production is deployed from `infra/komodo` instead (git mode of Komodo, see `docs/architecture.md` there): Komodo clones this repo, and a layer plus `deploy.sh` in the stack's directory tag images by the hash of what they bake in and write `.env` from sops. The repo only has to stay a plain recipe: images built from `build:` in compose, `caddy/site.caddy`. `make deploy` and `refs/deploy/*` are for a checkout deployed by hand.
|
||||
Reference in new issue
Block a user