Created
May 2, 2025 15:02
-
-
Save dastanaron/3be3cc2b1b58351b32407905ac241790 to your computer and use it in GitHub Desktop.
Start FocalBoard
This file contains hidden or 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 | |
CONTAINER_NAME="focalboard" | |
# Check if container exists | |
if docker container inspect "$CONTAINER_NAME" > /dev/null 2>&1; then | |
# Check if container is running | |
if [ "$(docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME")" = "true" ]; then | |
echo "Stopping container $CONTAINER_NAME..." | |
docker stop "$CONTAINER_NAME" | |
echo "Container successfully stopped" | |
else | |
echo "Starting existing container $CONTAINER_NAME..." | |
docker start "$CONTAINER_NAME" | |
echo "Container successfully started" | |
fi | |
else | |
echo "Creating and starting new container $CONTAINER_NAME..." | |
docker run -d --name "$CONTAINER_NAME" -p 8080:8000 mattermost/focalboard | |
echo "Container successfully created and started" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment