forked from DefectDojo/django-DefectDojo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dc-up.sh
executable file
·31 lines (25 loc) · 964 Bytes
/
dc-up.sh
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
#!/bin/bash
unset PROFILE
bash ./docker/docker-compose-check.sh
if [[ $? -eq 1 ]]; then exit 1; fi
if [ $# -eq 0 ]; then
if [ -z "$DD_PROFILE" ]
then
echo "No profile supplied, running default: postgres-redis"
PROFILE="postgres-redis"
echo "Other supported profiles:
postgres-redis*
postgres-rabbitmq
mysql-redis
mysql-rabbitmq
Usage example: ./dc-up.sh mysql-rabbitmq
"
else
PROFILE=$DD_PROFILE
fi
else
PROFILE=$1
fi
echo "Starting docker compose with profile $PROFILE in the foreground ..."
# 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 "$PROFILE" --env-file "./docker/environments/$PROFILE.env" up --no-deps