-
Notifications
You must be signed in to change notification settings - Fork 0
/
dc-stop.sh
executable file
·18 lines (15 loc) · 1.1 KB
/
dc-stop.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
bash ./docker/docker-compose-check.sh
if [[ $? -eq 1 ]]; then exit 1; fi
# Stopping containers for all configurations
# The environment must be provided but it doesn't make a difference which one
if [ $# -eq 0 ]
then
echo "Stopping docker compose"
# Compose V2 integrates compose functions into the Docker platform, continuing to support most of the previous docker-compose features and flags. You can run Compose V2 by replacing the hyphen (-) with a space, using docker compose, instead of docker-compose.
docker compose --profile mysql-rabbitmq --profile postgres-redis --env-file ./docker/environments/postgres-redis.env stop
else
echo "Stopping docker compose with additional parameter $1 ..."
# Compose V2 integrates compose functions into the Docker platform, continuing to support most of the previous docker-compose features and flags. You can run Compose V2 by replacing the hyphen (-) with a space, using docker compose, instead of docker-compose.
docker compose --profile mysql-rabbitmq --profile postgres-redis --env-file ./docker/environments/postgres-redis.env stop "$1"
fi