Files
Wackelpeter/Makefile
T

46 lines
1.1 KiB
Makefile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ── Wackelpeter build/deploy (podman) ───────────────────────────────────────
# Targets:
# make Build web frontend locally (npm run build)
# make web Same as `make`
# make dev Start Vite dev server
# make build Build container image (podman)
# make push Build & push image to registry (podman)
# make up/down Start/stop via docker-compose
# make run Start via podman directly
# make clean Remove local image
REGISTRY ?= gitea.korbel.network
IMAGE ?= $(REGISTRY)/nico/wackelpeter
TAG ?= latest
COMPOSE ?= docker-compose
.PHONY: web dev build push up down run clean login
web:
npm --prefix web install
npm --prefix web run build
dev:
npm --prefix web run dev
build:
podman build -t $(IMAGE):$(TAG) .
push: build
podman push $(IMAGE):$(TAG)
up: build
$(COMPOSE) up -d
down:
$(COMPOSE) down
run: build
podman run --rm -d --name wackelpeter -p 8080:80 $(IMAGE):$(TAG)
clean:
podman rmi $(IMAGE):$(TAG) || true
login:
podman login $(REGISTRY)