-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
48 lines (33 loc) · 1.29 KB
/
Makefile
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
FORCE_RECREATE_FLAG := $(if $(filter 1,$(ENABLE_FORCE_RECREATE)),--force-recreate,)
REMOVE_ORPHANS_FLAG := $(if $(or $(services),$(filter 1, $(DISABLE_REMOVE_ORPHANS))),,--remove-orphans)
REMOVE_ANSI_FLAG := $(if $(filter 1,$(DISABLE_ANSI)),,--ansi never)
SDC := $(if $(filter 1,$(SDC)),-f docker-compose.SDC.yaml,)
DOCKER_COMPOSE_COMMAND=docker compose ${SDC} $(REMOVE_ANSI_FLAG) -p bhasai
install-docker:
@./scripts/install-docker.sh
install-gpu-drivers:
@./scripts/install-gpu-drivers.sh
setup-daemon:
@./scripts/setup-daemon.sh
migrate-volume:
@./scripts/migrate-volume.sh
setup-webhook:
@./scripts/webhook/setup-webhook.sh
reload-caddy:
@echo "Reloading caddy"
$(DOCKER_COMPOSE_COMMAND) exec -w /etc/caddy caddy caddy reload || true
deploy: $(if $(filter 1,$(ENABLE_GIT_PULL)),git-pull,) $(if $(filter 1,$(DISABLE_PULL)),,pull build) reload-caddy
$(DOCKER_COMPOSE_COMMAND) up -d $(FORCE_RECREATE_FLAG) $(REMOVE_ORPHANS_FLAG) ${services}
restart:
$(DOCKER_COMPOSE_COMMAND) restart ${services}
stop:
$(DOCKER_COMPOSE_COMMAND) stop ${services}
down:
$(DOCKER_COMPOSE_COMMAND) down ${services}
pull:
$(DOCKER_COMPOSE_COMMAND) pull ${services}
build:
$(DOCKER_COMPOSE_COMMAND) build ${services}
git-pull:
git pull
.PHONY: deploy restart stop down pull build reload-caddy git-pull