llm, have the Docker-based services fork their background update checker and make it a loop.
This commit is contained in:
1 parent
855cffc64d
commit
5e0b5fb4d2
1 file changed
+34
-16
@@ -419,21 +419,29 @@
|
||||
# Ensure the old container is gone.
|
||||
echo "RUN: Stopping..."
|
||||
docker stop open-webui &&
|
||||
echo "RUN: Container stopped" ||
|
||||
echo "RUN: Container stopped." ||
|
||||
echo "RUN: Container already stopped."
|
||||
echo "RUN: Deleting..."
|
||||
docker rm -f open-webui &&
|
||||
echo "RUN: Container deleted" ||
|
||||
echo "RUN: Container deleted." ||
|
||||
echo "RUN: Container already deleted."
|
||||
|
||||
# Check for any new updates in background.
|
||||
sleep 300 &&
|
||||
echo "RUN: Updating..." &&
|
||||
docker pull $image &
|
||||
# Check for any new updates in the background.
|
||||
(
|
||||
while true; do
|
||||
sleep 600
|
||||
echo "RUN: Checking for updates..."
|
||||
docker pull $image
|
||||
done
|
||||
) &
|
||||
LOOP_PID=$!
|
||||
|
||||
# Ensure cleanup on any exit (normal or signal from runit).
|
||||
trap 'kill "$LOOP_PID" 2>/dev/null; wait "$LOOP_PID" 2>/dev/null' EXIT
|
||||
|
||||
# Start the open-webui program.
|
||||
set -e
|
||||
exec docker run \
|
||||
docker run \
|
||||
--name open-webui \
|
||||
-e PORT={{ open_webui_port }} \
|
||||
-p {{ open_webui_port }}:{{ open_webui_port }} \
|
||||
@@ -657,7 +665,7 @@
|
||||
|
||||
- name: Workstation | Linux | Software | LLMs | runit | open-terminal | Script | Compose YAML
|
||||
ansible.builtin.copy:
|
||||
dest: /usr/local/etc/open-terminal/docker-compose.yml
|
||||
dest: /usr/local/etc/open-terminal/compose.yml
|
||||
content: |
|
||||
#exec docker run \
|
||||
# --name open-terminal \
|
||||
@@ -786,22 +794,32 @@
|
||||
|
||||
# Ensure the old container is stopped.
|
||||
echo "RUN: Stopping..."
|
||||
docker compose -f /usr/local/etc/open-terminal/docker-compose.yml down &&
|
||||
echo "RUN: Container stopped" ||
|
||||
docker compose \
|
||||
-f /usr/local/etc/open-terminal/docker-compose.yml down &&
|
||||
echo "RUN: Container stopped." ||
|
||||
echo "RUN: Container already stopped."
|
||||
|
||||
# Check for any new updates in background.
|
||||
sleep 600 &&
|
||||
echo "RUN: Updating..." &&
|
||||
docker compose -f /usr/local/etc/open-terminal/docker-compose.yml \
|
||||
build --pull &
|
||||
# Check for any new updates in the background.
|
||||
(
|
||||
while true; do
|
||||
sleep 600
|
||||
echo "RUN: Checking for updates..."
|
||||
docker compose \
|
||||
-f /usr/local/etc/open-terminal/compose.yml \
|
||||
build --pull
|
||||
done
|
||||
) &
|
||||
LOOP_PID=$!
|
||||
|
||||
# Ensure cleanup on any exit (normal or signal from runit).
|
||||
trap 'kill "$LOOP_PID" 2>/dev/null; wait "$LOOP_PID" 2>/dev/null' EXIT
|
||||
|
||||
export GOT_EM=true
|
||||
|
||||
# Start the open-terminal program.
|
||||
# https://github.com/open-webui/open-terminal#configuration
|
||||
set -e
|
||||
exec docker compose -f /usr/local/etc/open-terminal/docker-compose.yml up
|
||||
docker compose -f /usr/local/etc/open-terminal/docker-compose.yml up
|
||||
owner: root
|
||||
mode: "0755"
|
||||
|
||||
|
||||
Reference in new issue
Block a user