-
Notifications
You must be signed in to change notification settings - Fork 0
/
dc
executable file
·33 lines (27 loc) · 836 Bytes
/
dc
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
# Wrapper script around docker-compose to resolve environment
# args which are used in the docker-compose.yml
#
# By default the main environment file is located outside this repo at
# /home/pi/rpi-configs/environment.sh
# This is because the environment file might and probably will
# contain sensitive information such as passwords.
#
# Please see the service definitions in the docker-compose.yml
# and set the required environment variables accordingly.
MACHINE_NAME=services
CONFIG_DIR=/home/pi/rpi-configs/${MACHINE_NAME}
ENV_FILE=${CONFIG_DIR}/environment.sh
LOG_DIRECTORY=/home/pi/logs
if [ -e ${ENV_FILE} ]
then
source ${ENV_FILE}
fi
if [ -z ${LOG_LEVEL+x} ]; then
# Setting LOG_LEVEL to default value
LOG_LEVEL=INFO
fi
export LOG_LEVEL
export CONFIG_DIR
export LOG_DIRECTORY
docker-compose $@