forked from elastic/connectors
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop-stack.sh
More file actions
executable file
·33 lines (26 loc) · 845 Bytes
/
stop-stack.sh
File metadata and controls
executable file
·33 lines (26 loc) · 845 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
#!/bin/bash
set -eo pipefail
export CURDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
if ! which docker-compose > /dev/null; then
echo "Could not find 'docker-compose'. Make sure it is installed and available via your PATH"
exit 2
fi
source $CURDIR/set-env.sh
compose_file=$CURDIR/docker/docker-compose.yml
. $CURDIR/parse-params.sh
parse_params $@
eval set -- "$parsed_params"
echo "Stopping running containers..."
if [ "${remove_volumes:-}" == true ]; then
echo "... also removing data volumes..."
docker-compose -f $compose_file down -v
else
docker-compose -f $compose_file down
fi
if [ "${reset_config:-}" == true ]; then
config_path="$PROJECT_ROOT/scripts/stack/connectors-config"
echo "... removing configuration file..."
if [ -d "$config_path" ]; then
rm -rf "$config_path"
fi
fi