19 lines
442 B
Bash
Executable File
19 lines
442 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Copy this file to /usr/sbin/start to enable easy startup
|
|
# sudo cp start.sh /usr/sbin/start
|
|
|
|
#docker stack deploy -c compose.yml ${PWD##*/}
|
|
|
|
|
|
# Check if .env file exists in the current directory
|
|
if [ ! -f ".env" ]; then
|
|
touch .env
|
|
fi
|
|
|
|
if [ -f ".env" ]; then
|
|
env $(grep -v '^#' ${PWD}/.env | sed 's/#.*//' | xargs) docker stack deploy -c compose.yml ${PWD##*/}
|
|
else
|
|
docker stack deploy -c compose.yml ${PWD##*/}
|
|
fi
|