-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·39 lines (31 loc) · 840 Bytes
/
update.sh
File metadata and controls
executable file
·39 lines (31 loc) · 840 Bytes
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
#!/usr/bin/env bash
set -e
# shellcheck source=helpers.sh
. helpers.sh
load_env
cd "$BITCART_BASE_DIRECTORY"
if [[ "$1" != "--skip-git-pull" ]]; then
git pull --force
exec "./update.sh" --skip-git-pull
return
fi
if ! [ -f "/etc/docker/daemon.json" ] && [ -w "/etc/docker" ]; then
echo "{
\"log-driver\": \"json-file\",
\"log-opts\": {\"max-size\": \"5m\", \"max-file\": \"3\"}
}" >/etc/docker/daemon.json
echo "Setting limited log files in /etc/docker/daemon.json"
fi
if ! ./build.sh; then
echo "Failed to generate the docker-compose"
exit 1
fi
# shellcheck source=helpers.sh
. helpers.sh
check_docker_compose
install_tooling
bitcart_update_docker_env
bitcart_pull
bitcart_start
set +e
docker image prune -f --filter "label=org.bitcart.image" --filter "label!=org.bitcart.image=docker-compose-generator"