-
-
Save Nicolab/bd64a4c64ff7e8cc555bb694d53b0edb 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