File tree Expand file tree Collapse file tree 3 files changed +23
-12
lines changed Expand file tree Collapse file tree 3 files changed +23
-12
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,12 @@ function ensure_file_from_example {
53
53
fi
54
54
}
55
55
56
+ # Check the version of $1 is greater than or equal to $2 using sort. Note: versions must be stripped of "v"
57
+ function vergte() {
58
+ printf " %s\n%s" $1 $2 | sort --version-sort --check=quiet --reverse
59
+ echo $?
60
+ }
61
+
56
62
SENTRY_CONFIG_PY=sentry/sentry.conf.py
57
63
SENTRY_CONFIG_YML=sentry/config.yml
58
64
Original file line number Diff line number Diff line change @@ -2,12 +2,6 @@ echo "${_group}Checking minimum requirements ..."
2
2
3
3
source install/_min-requirements.sh
4
4
5
- # Check the version of $1 is greater than or equal to $2 using sort. Note: versions must be stripped of "v"
6
- function vergte() {
7
- printf " %s\n%s" $1 $2 | sort --version-sort --check=quiet --reverse
8
- echo $?
9
- }
10
-
11
5
DOCKER_VERSION=$( docker version --format ' {{.Server.Version}}' || echo ' ' )
12
6
if [[ -z " $DOCKER_VERSION " ]]; then
13
7
echo " FAIL: Unable to get docker version, is the docker daemon running?"
@@ -20,12 +14,6 @@ if [[ "$(vergte ${DOCKER_VERSION//v/} $MIN_DOCKER_VERSION)" -eq 1 ]]; then
20
14
fi
21
15
echo " Found Docker version $DOCKER_VERSION "
22
16
23
- COMPOSE_VERSION=$( $dc_base version --short || echo ' ' )
24
- if [[ -z " $COMPOSE_VERSION " ]]; then
25
- echo " FAIL: Docker compose is required to run self-hosted"
26
- exit 1
27
- fi
28
-
29
17
if [[ " $( vergte ${COMPOSE_VERSION// v/ } $MIN_COMPOSE_VERSION ) " -eq 1 ]]; then
30
18
echo " FAIL: Expected minimum $dc_base version to be $MIN_COMPOSE_VERSION but found $COMPOSE_VERSION "
31
19
exit 1
Original file line number Diff line number Diff line change @@ -10,6 +10,23 @@ echo "${_group}Initializing Docker Compose ..."
10
10
11
11
# To support users that are symlinking to docker-compose
12
12
dc_base=" $( docker compose version & > /dev/null && echo ' docker compose' || echo ' docker-compose' ) "
13
+ dc_base_standalone=" $( docker-compose version & > /dev/null && echo ' docker-compose' || echo ' ' ) "
14
+
15
+ COMPOSE_VERSION=$( $dc_base version --short || echo ' ' )
16
+ STANDALONE_COMPOSE_VERSION=$( $dc_base_standalone version --short & > /dev/null || echo ' ' )
17
+
18
+ if [[ -z " $COMPOSE_VERSION " && -z " $STANDALONE_COMPOSE_VERSION " ]]; then
19
+ echo " FAIL: Docker Compose is required to run self-hosted"
20
+ exit 1
21
+ fi
22
+
23
+ if [[ ! -z " ${STANDALONE_COMPOSE_VERSION} " ]]; then
24
+ if [[ " $( vergte ${COMPOSE_VERSION// v/ } ${STANDALONE_COMPOSE_VERSION// v/ } ) " -eq 1 ]]; then
25
+ COMPOSE_VERSION=" ${STANDALONE_COMPOSE_VERSION} "
26
+ dc_base=" $dc_base_standalone "
27
+ fi
28
+ fi
29
+
13
30
if [[ " $( basename $0 ) " = " install.sh" ]]; then
14
31
dc=" $dc_base --ansi never --env-file ${_ENV} "
15
32
else
You can’t perform that action at this time.
0 commit comments