29 lines
596 B
Bash
29 lines
596 B
Bash
#!/bin/sh
|
|
|
|
# Check for updates.
|
|
git pull
|
|
|
|
# Create the enviroment file.
|
|
if [ ! -f ".env" ]; then
|
|
# If the destination file doesn't exist, copy the source file to the destination
|
|
cp ".env.example" ".env"
|
|
|
|
if [ -z "$EDITOR" ]; then
|
|
EDITOR="nano"
|
|
fi
|
|
|
|
$EDITOR .env
|
|
else
|
|
echo ".env file already exists. Make sure to check for updates in the .env.example file."
|
|
fi
|
|
|
|
# Build image and create the container.
|
|
docker compose down
|
|
|
|
docker compose build
|
|
|
|
docker compose up -d
|
|
|
|
echo "Everything's set up and running!"
|
|
echo "You can stop the bot running 'docker compose down'."
|