Updated start.sh to check for .env
This commit is contained in:
6
start.sh
6
start.sh
@@ -1,8 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copy this file to /usr/sbin/start to enable easy startup
|
# Copy this file to /usr/sbin/start to enable easy startup
|
||||||
# cp start.sh /usr/sbin/start
|
# sudo cp start.sh /usr/sbin/start
|
||||||
|
|
||||||
#docker stack deploy -c compose.yml ${PWD##*/}
|
#docker stack deploy -c compose.yml ${PWD##*/}
|
||||||
|
|
||||||
|
if [ -f ".env" ]; then
|
||||||
env $(grep -v '^#' ${PWD}/.env | sed 's/#.*//' | xargs) docker stack deploy -c compose.yml ${PWD##*/}
|
env $(grep -v '^#' ${PWD}/.env | sed 's/#.*//' | xargs) docker stack deploy -c compose.yml ${PWD##*/}
|
||||||
|
else
|
||||||
|
docker stack deploy -c compose.yml ${PWD##*/}
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user