Created
January 22, 2018 16:04
-
-
Save ilourt/2fff392b9ec2a04c4249bc8dc4c63790 to your computer and use it in GitHub Desktop.
Start script to use with systemd to take into account env var
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Absolute path to this script, e.g. /home/user/bin/foo.sh | |
SCRIPT=$(readlink -f "$0") | |
# Absolute path this script is in, thus /home/user/bin | |
SCRIPTPATH=$(dirname "$SCRIPT") | |
echo $SCRIPTPATH | |
export $(cat ${SCRIPTPATH}/.env | xargs) | |
docker-compose -f ${SCRIPTPATH}/docker-compose.yml up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment