Skip to content

Commit

Permalink
core: ensure lxc-docker is updated every boot
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Dec 29, 2024
1 parent 0cf4802 commit 8e1dfa8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
18 changes: 6 additions & 12 deletions install/proxmox/docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,15 @@ cd /root/.scrypted
# always immediately upgrade everything in case there's a broken update.
# this will also be preferable for troubleshooting via lxc reboot.
export DEBIAN_FRONTEND=noninteractive
((yes | dpkg --configure -a) ; apt -y --fix-broken install && apt -y update && apt -y dist-upgrade) &
yes | dpkg --configure -a
apt -y --fix-broken install && apt -y update && apt -y dist-upgrade

# foreground pull if requested.
if [ -e "volume/.pull" ]
then
rm -rf volume/.pull
PULL="--pull"
(sleep 300 && docker container prune -f && docker image prune -a -f) &
else
# always background pull in case there's a broken image.
(sleep 300 && docker compose pull && docker container prune -f && docker image prune -a -f) &
fi
# force a pull to ensure we have the latest images.
# not using --pull always cause that fails everything on network down
docker compose pull

# do not daemonize, when it exits, systemd will restart it.
# force a recreate as .env may have changed.
# furthermore force recreate gets the container back into a known state
# which is preferable in case the user has made manual changes and then restarts.
WATCHTOWER_HTTP_API_TOKEN=$(echo $RANDOM | md5sum | head -c 32) docker compose up --force-recreate --abort-on-container-exit $PULL
WATCHTOWER_HTTP_API_TOKEN=$(echo $RANDOM | md5sum | head -c 32) docker compose up --force-recreate --abort-on-container-exit
4 changes: 2 additions & 2 deletions plugins/core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/core",
"version": "0.3.101",
"version": "0.3.102",
"description": "Scrypted Core plugin. Provides the UI, websocket, and engine.io APIs.",
"author": "Scrypted",
"license": "Apache-2.0",
Expand Down

0 comments on commit 8e1dfa8

Please sign in to comment.