-
Notifications
You must be signed in to change notification settings - Fork 27
/
start-after-git-pull
executable file
·43 lines (32 loc) · 1.2 KB
/
start-after-git-pull
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
40
41
42
43
#!/bin/sh
DIRNAME="$(dirname "$0")"
CONFIG="$(dirname "$0")"/config
NETWORK="overviewlocal_default"
[ -f "$CONFIG"/overview.env ] || echo '# You may edit this file. Read overview.defaults.env for options.' > "$CONFIG"/overview.env
. "$DIRNAME"/common.sh
. "$DIRNAME"/lib/upgrade-obsolete-volumes.sh
migrate_volumes_if_needed
echo "Applying latest schema..."
docker_compose run --rm overview-db-evolution-applier
echo "Launching Overview..."
docker_compose up --remove-orphans -d
echo "OV_URL: $OV_URL; OV_DOMAIN_NAME: $OV_DOMAIN_NAME"
[ -z "$OV_URL" ] && [ -n "$OV_DOMAIN_NAME" ] && OV_URL="https://$OV_DOMAIN_NAME"
[ -z "$OV_URL" ] && OV_URL="http://localhost:9000"
link_plugins() {
echo "Linking Overview plugins..."
docker run \
--env "OV_DOMAIN_NAME=$OV_DOMAIN_NAME" \
--env "OVERVIEW_ADDRESS=$OVERVIEW_ADDRESS" \
--net "$NETWORK" \
--rm overview/plugin-setup
}
[ "$SKIP_PLUGIN_SETUP" = "true" ] || link_plugins
echo "Waiting for everything to come online..."
# Wait for the server to start
docker run \
--net "$NETWORK" \
--rm "$BUSYBOX_IMAGE" \
sh -c 'until wget http://overview-proxy:9000 2>/dev/null; do sleep 1; done'
echo
echo "Overview is running: browse to $OV_URL to use it"