Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
150 lines (124 loc) · 4.14 KB
/
Copy pathMakefile
File metadata and controls
150 lines (124 loc) · 4.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# devinfra — local development infrastructure
#
# DEPRECATED. pixi is the task surface: run `pixi task list` to see every task,
# `pixi run <task>` to run one. This file survives for one release so existing
# muscle memory keeps working; every target below forwards to its pixi task and
# prints a notice on stderr, leaving stdout exactly as it was.
#
# No recipe here contains logic. Anything that needed a loop, a conditional or a
# `read` now lives in scripts/, where it can be run standalone and tested.
SHELL := /bin/bash
.DEFAULT_GOAL := help
# Emitted on stderr so a pipeline consuming a target's stdout is unaffected.
NOTICE = echo "make $@ is deprecated — run 'pixi run $@'. Forwarding." >&2
.PHONY: help
help: ## Show this help
@$(NOTICE)
@pixi task list
# ---------------------------------------------------------------------------
# Lifecycle
# ---------------------------------------------------------------------------
.PHONY: init
init: ## Create .env from the template if it does not exist
@$(NOTICE)
@pixi run init
.PHONY: up
up: ## Start the stack (the Selection COMPOSE_PROFILES asks for)
@$(NOTICE)
@pixi run up
.PHONY: up-core
up-core: ## Start only the core Bundle: the data layer, Keycloak, object storage and Mailpit
@$(NOTICE)
@pixi run up-core
.PHONY: down
down: ## Stop and remove containers, PRESERVING all data volumes
@$(NOTICE)
@pixi run down
.PHONY: stop
stop: ## Stop containers without removing them
@$(NOTICE)
@pixi run stop
.PHONY: restart
restart: ## Recreate the stack, preserving data
@$(NOTICE)
@pixi run restart
.PHONY: destroy
destroy: ## DELETE ALL DATA — remove containers and every named volume
@$(NOTICE)
@pixi run destroy
.PHONY: pull
pull: ## Pull newer images for every pinned tag
@$(NOTICE)
@pixi run pull
.PHONY: wait
wait: ## Block until every container is running and every healthcheck is healthy
@$(NOTICE)
@pixi run wait
# ---------------------------------------------------------------------------
# Inspection
# ---------------------------------------------------------------------------
.PHONY: ps
ps: ## Show container status and health
@$(NOTICE)
@pixi run ps
.PHONY: logs
logs: ## Tail logs for all services (or one: make logs S=keycloak)
@$(NOTICE)
@pixi run logs $(S)
.PHONY: smoke
smoke: ## Run the end-to-end smoke test against the running stack
@$(NOTICE)
@pixi run smoke
.PHONY: urls
urls: ## Print the endpoints the ambient Selection publishes
@$(NOTICE)
@pixi run urls
# ---------------------------------------------------------------------------
# Shells
# ---------------------------------------------------------------------------
.PHONY: psql
psql: ## Open a psql shell (make psql DB=keycloak)
@$(NOTICE)
@pixi run psql $(DB)
.PHONY: redis-cli
redis-cli: ## Open a redis-cli shell (make redis-cli N=1 to select a db)
@$(NOTICE)
@pixi run redis-cli $(N)
.PHONY: mc
mc: ## Open a shell with the MinIO client configured
@$(NOTICE)
@pixi run mc
# ---------------------------------------------------------------------------
# Data operations
# ---------------------------------------------------------------------------
.PHONY: backup
backup: ## Capture every stateful Module in the Selection into backups/<timestamp>/
@$(NOTICE)
@pixi run backup
.PHONY: restore
restore: ## Restore a backup directory: make restore F=backups/20260909-153000
@$(NOTICE)
@pixi run restore $(F)
.PHONY: keycloak-reimport
keycloak-reimport: ## Re-import the realm from the seed JSON with override, then restart Keycloak (replaces that realm; keeps the database)
@$(NOTICE)
@pixi run keycloak-reimport
.PHONY: keycloak-export
keycloak-export: ## Export the live realm back to services/keycloak/seed/
@$(NOTICE)
@pixi run keycloak-export
.PHONY: token
token: ## Mint an access token for user dev via the CLI client
@$(NOTICE)
@pixi run token $(or $(U),dev) $(or $(P),dev)
.PHONY: config
config: ## Render the fully resolved compose configuration
@$(NOTICE)
@pixi run config
# ---------------------------------------------------------------------------
# Validation
# ---------------------------------------------------------------------------
.PHONY: lint
lint: ## Run every validation check
@$(NOTICE)
@pixi run lint