-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (44 loc) · 1.74 KB
/
Copy pathMakefile
File metadata and controls
58 lines (44 loc) · 1.74 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
.PHONY: help status sync enable start restart check build shell logs ps dcup dcdn
PYTHON ?= python3
COMPOSE ?= docker compose
COMPOSE_FILE := container/docker-compose.yml
COMPOSE_PROJECT_DIR := container
RUN_DIR := /home/dev/.config/dev-env
help:
@echo "devbox targets:"
@echo " status dry-run host state report"
@echo " sync converge host state without starting container"
@echo " enable converge host state and enable systemd unit"
@echo " start converge host state and start systemd unit"
@echo " restart converge host state and restart systemd unit"
@echo " check run fast local validation checks"
@echo " build build container image from repo compose file"
@echo " shell enter running container shell"
@echo " logs show compose logs from installed runtime dir"
@echo " ps show compose services from installed runtime dir"
@echo " dcup docker compose up -d from installed runtime dir"
@echo " dcdn docker compose down from installed runtime dir"
status:
$(PYTHON) host/sync.py status
sync:
$(PYTHON) host/sync.py enable
enable:
$(PYTHON) host/sync.py enable
start:
$(PYTHON) host/sync.py start
restart:
$(PYTHON) host/sync.py restart
check:
./scripts/check.sh
build:
$(COMPOSE) -f $(COMPOSE_FILE) --project-directory $(COMPOSE_PROJECT_DIR) build
shell:
$(COMPOSE) -f $(RUN_DIR)/docker-compose.yml --project-directory $(RUN_DIR) exec dev zsh
logs:
$(COMPOSE) -f $(RUN_DIR)/docker-compose.yml --project-directory $(RUN_DIR) logs -f
ps:
$(COMPOSE) -f $(RUN_DIR)/docker-compose.yml --project-directory $(RUN_DIR) ps
dcup:
$(COMPOSE) -f $(RUN_DIR)/docker-compose.yml --project-directory $(RUN_DIR) up -d
dcdn:
$(COMPOSE) -f $(RUN_DIR)/docker-compose.yml --project-directory $(RUN_DIR) down