Override-based compose, profiles in .env, README

This commit is contained in:
hh
2026-09-09 00:18:15 +02:00
parent ecd38ee28b
commit e0d55e12e9
6 changed files with 39 additions and 27 deletions
+10 -13
View File
@@ -1,8 +1,6 @@
COMPOSE := docker compose{% if layout == 'part' %} --project-directory ..{% endif %}
{% if layout == 'root' %}SERVICES := $(COMPOSE) --profile services
EXTERNAL := $(COMPOSE) --profile external
{% endif %}
.PHONY: {% if layout == 'root' %}env external recreate rebuild restart logs down {% endif %}fmt check build dev
.PHONY: {% if layout == 'root' %}env recreate rebuild restart logs down {% endif %}fmt check build dev
fmt:
bun run fix
@@ -20,21 +18,20 @@ dev:
{% if layout == 'root' %}
env:
@test -f .env || cp .env.example .env
@test -f docker-compose.override.yml || cp docker-compose.override.yml.example docker-compose.override.yml
external:
$(EXTERNAL) up -d
recreate:
$(COMPOSE) up -d --force-recreate
recreate: external
$(SERVICES) up -d --force-recreate
rebuild: build recreate
rebuild: build
$(COMPOSE) up -d
restart:
$(SERVICES) restart
$(COMPOSE) restart
logs:
$(SERVICES) logs -f --tail=100
$(COMPOSE) logs -f --tail=100
down:
$(EXTERNAL) --profile services down
$(COMPOSE) down
{% endif %}