Single part at the root, COMPOSE_FILE in .env

This commit is contained in:
hh
2026-09-08 20:38:27 +02:00
parent ade2cebf63
commit ecd38ee28b
31 changed files with 70 additions and 28 deletions
+40
View File
@@ -0,0 +1,40 @@
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
fmt:
bun run fix
check:
bun run check
bun run lint
build:
{% if serve == 'api' %} $(COMPOSE) run --rm frontend-dev sh -c "bun install && bun run build"
{% else %} $(COMPOSE) build frontend
{% endif %}
dev:
bun run dev
{% if layout == 'root' %}
env:
@test -f .env || cp .env.example .env
external:
$(EXTERNAL) up -d
recreate: external
$(SERVICES) up -d --force-recreate
rebuild: build recreate
restart:
$(SERVICES) restart
logs:
$(SERVICES) logs -f --tail=100
down:
$(EXTERNAL) --profile services down
{% endif %}