Files
kompress_eshop/Makefile
2026-06-29 19:44:17 +02:00

66 lines
1.4 KiB
Makefile

COMPOSE ?= docker compose -f docker-compose.prod.yml --env-file .env.production
PODMAN_COMPOSE ?= podman compose -f podman-compose.prod.yml --env-file .env.production
# --- Frontend (Tailwind v4 + PenguinUI) -----------------------------
# Uses the Tailwind v4 standalone binary (no Node required at runtime).
# The compiled assets/static/css/app.css is committed and served by loco.
TW = bin/tailwindcss
CSS_IN = assets/css/app.css
CSS_OUT = assets/static/css/app.css
UNAME_M := $(shell uname -m)
ifeq ($(UNAME_M),aarch64)
TW_TARGET = tailwindcss-linux-arm64
else
TW_TARGET = tailwindcss-linux-x64
endif
.PHONY: up down restart logs build ps podman-up podman-down podman-restart podman-logs podman-build podman-ps css css-watch tailwind
$(TW):
@mkdir -p bin
curl -fsSL -o $(TW) \
"https://github.com/tailwindlabs/tailwindcss/releases/latest/download/$(TW_TARGET)"
chmod +x $(TW)
tailwind: $(TW)
css: $(TW)
$(TW) -i $(CSS_IN) -o $(CSS_OUT) --minify
css-watch: $(TW)
$(TW) -i $(CSS_IN) -o $(CSS_OUT) --watch
up:
$(COMPOSE) up -d --build
down:
$(COMPOSE) down
restart: down up
logs:
$(COMPOSE) logs -f --tail=100
build:
$(COMPOSE) build --no-cache
ps:
$(COMPOSE) ps
podman-up:
$(PODMAN_COMPOSE) up -d --build
podman-down:
$(PODMAN_COMPOSE) down
podman-restart: podman-down podman-up
podman-logs:
$(PODMAN_COMPOSE) logs -f --tail=100
podman-build:
$(PODMAN_COMPOSE) build --no-cache
podman-ps:
$(PODMAN_COMPOSE) ps