-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (38 loc) · 1.14 KB
/
Makefile
File metadata and controls
48 lines (38 loc) · 1.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
# Makefile for Writing Dashboard
ENV_FILE := .env
SAMPLE_FILE := docker-compose.yml.sample
COMPOSE_FILE := docker-compose.yml
.PHONY: up all help clean
# Default target
all: help
# Start the dashboard (generates compose file first)
up: $(COMPOSE_FILE)
docker compose up
# Start the dashboard in detached mode
up-d: $(COMPOSE_FILE)
docker compose up -d
# Stop the dashboard
down:
docker compose down
# Generate docker-compose.yml from sample file
$(COMPOSE_FILE): $(SAMPLE_FILE) $(ENV_FILE)
@echo "Generating $@ from $<..."
node scripts/gen-compose.mjs
# Rebuild the Docker image
rebuild: $(COMPOSE_FILE)
docker compose build
# Clean up generated files
clean:
@echo "Cleaning generated files..."
rm -f $(COMPOSE_FILE)
# Show help
help:
@echo "Writing Dashboard Makefile"
@echo ""
@echo "Available targets:"
@echo " make up - Generate compose file and start dashboard"
@echo " make up-d - Generate compose file and start dashboard (detached)"
@echo " make down - Stop dashboard"
@echo " make rebuild - Rebuild Docker image"
@echo " make clean - Clean generated files"
@echo " make help - Show this help message"