Skip to content

Commit e1e66f7

Browse files
committed
Chose between "docker-compose" and "docker compose" in Makefile
1 parent e0ebd7a commit e1e66f7

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

Makefile

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
1+
2+
ifneq ($(shell which docker-compose 2>/dev/null),)
3+
DOCKER_COMPOSE := docker-compose
4+
else
5+
DOCKER_COMPOSE := docker compose
6+
endif
7+
18
install:
2-
@docker-compose up -d
9+
$(DOCKER_COMPOSE) up -d
310

411
remove:
512
@chmod +x confirm_remove.sh
613
@./confirm_remove.sh
714

8-
915
start:
10-
@docker-compose start
16+
$(DOCKER_COMPOSE) start
1117
startAndBuild:
12-
docker-compose up -d --build
18+
$(DOCKER_COMPOSE) up -d --build
1319

1420
stop:
15-
@docker-compose stop
21+
$(DOCKER_COMPOSE) stop
1622

1723
update:
1824
# Calls the LLM update script
1925
chmod +x update_ollama_models.sh
2026
@./update_ollama_models.sh
2127
@git pull
22-
@docker-compose down
28+
$(DOCKER_COMPOSE) down
2329
# Make sure the ollama-webui container is stopped before rebuilding
2430
@docker stop open-webui || true
25-
@docker-compose up --build -d
26-
@docker-compose start
31+
$(DOCKER_COMPOSE) up --build -d
32+
$(DOCKER_COMPOSE) start
2733

0 commit comments

Comments
 (0)