-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (39 loc) · 1.1 KB
/
Copy pathMakefile
File metadata and controls
48 lines (39 loc) · 1.1 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
# Project defaults
PROJECT_NAME=klaro-custom
SERVICE_NAME=klaro
BUILD_DIR=dist
.DEFAULT_GOAL := help
## Show help
help:
@echo ""
@echo "$(PROJECT_NAME) – docker-compose Make commands:"
@echo ""
@echo "make up – Start container (npm run dev)"
@echo "make down – Stop containers"
@echo "make build – Build project (npm run build in container)"
@echo "make install – npm install in the container"
@echo "make shell – Interactive shell in the container"
@echo "make clean – Delete build directory"
@echo "make rebuild – Rebuild Docker image"
@echo ""
## Start container (vite dev)
up:
docker compose up
## Stop containers
down:
docker compose down
## Build Klaro (vite build)
build:
docker compose run --rm $(SERVICE_NAME) npm run build
## npm install in the container
install:
docker compose run --rm $(SERVICE_NAME) npm install
## Interactive shell in the container
shell:
docker compose run --rm $(SERVICE_NAME) sh
## Rebuild Docker image
rebuild:
docker compose build --no-cache
## Delete build directory
clean:
rm -rf $(BUILD_DIR)