Files
docker/start.sh
T
2026-06-14 13:25:43 +02:00

16 lines
396 B
Bash
Executable File

#!/bin/bash
# Copy this file to /usr/sbin/start to enable easy startup
# sudo cp start.sh /usr/sbin/start
# 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 -0) docker stack deploy -c compose.yml ${PWD##*/}
else
docker stack deploy -c compose.yml ${PWD##*/}
fi