-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (49 loc) · 1.89 KB
/
Makefile
File metadata and controls
62 lines (49 loc) · 1.89 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
SHELL := /bin/bash
ROOT_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
.PHONY: help up down build logs \
backend-logs frontend-logs ibmmq-logs \
ibmmq-status ibmmq-gen-queues
COMPOSE := docker compose -f infra/docker-compose.yml --env-file .env
help:
@echo "Available targets:"
@echo " up - Generate MQSC file and start full stack"
@echo " down - Stop full stack"
@echo " build - Build backend and frontend images"
@echo " logs - Tail all service logs"
@echo " backend-logs - Tail backend logs"
@echo " frontend-logs - Tail frontend logs"
@echo " ibmmq-logs - Tail IBM MQ logs"
@echo " ibmmq-status - Show all container status"
@echo " ibmmq-gen-queues - Generate infra/ibmmq/20-spb-queues.mqsc from .env"
# ---------------------------------------------------------------------------
# Build
# ---------------------------------------------------------------------------
build:
$(COMPOSE) build backend frontend
# ---------------------------------------------------------------------------
# Full stack
# ---------------------------------------------------------------------------
up: ibmmq-gen-queues
$(COMPOSE) up -d
@echo "Stack up: ibmmq, backend (:3000), frontend (:8080)"
down:
$(COMPOSE) down
@echo "Stack stopped."
# ---------------------------------------------------------------------------
# Logs
# ---------------------------------------------------------------------------
logs:
$(COMPOSE) logs -f
backend-logs:
$(COMPOSE) logs -f backend
frontend-logs:
$(COMPOSE) logs -f frontend
ibmmq-logs:
$(COMPOSE) logs -f ibmmq
# ---------------------------------------------------------------------------
# IBM MQ
# ---------------------------------------------------------------------------
ibmmq-gen-queues:
cd infra/ibmmq && bash gen-setup-spb-queues.sh
ibmmq-status:
$(COMPOSE) ps