mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 13:40:55 +00:00
Merge pull request #1616 from Entaigner/patch-1
Chose between "docker-compose" and "docker compose" in Makefile
This commit is contained in:
commit
69d32a94ab
22
Makefile
22
Makefile
@ -1,27 +1,33 @@
|
|||||||
|
|
||||||
|
ifneq ($(shell which docker-compose 2>/dev/null),)
|
||||||
|
DOCKER_COMPOSE := docker-compose
|
||||||
|
else
|
||||||
|
DOCKER_COMPOSE := docker compose
|
||||||
|
endif
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@docker-compose up -d
|
$(DOCKER_COMPOSE) up -d
|
||||||
|
|
||||||
remove:
|
remove:
|
||||||
@chmod +x confirm_remove.sh
|
@chmod +x confirm_remove.sh
|
||||||
@./confirm_remove.sh
|
@./confirm_remove.sh
|
||||||
|
|
||||||
|
|
||||||
start:
|
start:
|
||||||
@docker-compose start
|
$(DOCKER_COMPOSE) start
|
||||||
startAndBuild:
|
startAndBuild:
|
||||||
docker-compose up -d --build
|
$(DOCKER_COMPOSE) up -d --build
|
||||||
|
|
||||||
stop:
|
stop:
|
||||||
@docker-compose stop
|
$(DOCKER_COMPOSE) stop
|
||||||
|
|
||||||
update:
|
update:
|
||||||
# Calls the LLM update script
|
# Calls the LLM update script
|
||||||
chmod +x update_ollama_models.sh
|
chmod +x update_ollama_models.sh
|
||||||
@./update_ollama_models.sh
|
@./update_ollama_models.sh
|
||||||
@git pull
|
@git pull
|
||||||
@docker-compose down
|
$(DOCKER_COMPOSE) down
|
||||||
# Make sure the ollama-webui container is stopped before rebuilding
|
# Make sure the ollama-webui container is stopped before rebuilding
|
||||||
@docker stop open-webui || true
|
@docker stop open-webui || true
|
||||||
@docker-compose up --build -d
|
$(DOCKER_COMPOSE) up --build -d
|
||||||
@docker-compose start
|
$(DOCKER_COMPOSE) start
|
||||||
|
|
||||||
|
@ -2,7 +2,12 @@
|
|||||||
echo "Warning: This will remove all containers and volumes, including persistent data. Do you want to continue? [Y/N]"
|
echo "Warning: This will remove all containers and volumes, including persistent data. Do you want to continue? [Y/N]"
|
||||||
read ans
|
read ans
|
||||||
if [ "$ans" == "Y" ] || [ "$ans" == "y" ]; then
|
if [ "$ans" == "Y" ] || [ "$ans" == "y" ]; then
|
||||||
docker-compose down -v
|
command docker-compose 2>/dev/null
|
||||||
|
if [ "$?" == "0" ]; then
|
||||||
|
docker-compose down -v
|
||||||
|
else
|
||||||
|
docker compose down -v
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Operation cancelled."
|
echo "Operation cancelled."
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user