server-setup/setup.sh

46 lines
1 KiB
Bash
Raw Permalink Normal View History

2026-05-18 13:20:30 -04:00
#!/bin/bash
if command -v podman &> /dev/null; then
PROG="podman"
echo "Podman command exists"
elif command -v docker &> /dev/null; then
PROG="docker"
echo "Docker command exists"
else
echo "Container command (Docker/Podman) could not be found!"
2026-05-18 15:33:02 -04:00
exit 1
2026-05-18 13:20:30 -04:00
fi
if [ -d "nginx" ]; then
cd nginx
echo "Attempting to start nginx container ..."
$PROG compose -f docker-compose.yml up -d
cd ..
2026-05-18 15:33:02 -04:00
else
echo "Nginx folder does not exist. You must have an Nginx Proxy Manager instance to continue."
exit 1
fi
2026-05-18 13:20:30 -04:00
# Check if folder exists
if [ -d "forgejo" ]; then
cd forgejo
echo "Attempting to start forgejo container ..."
$PROG compose -f docker-compose.yml up -d
cd ..
2026-05-18 13:20:30 -04:00
fi
2026-05-18 15:34:31 -04:00
if [ -d "immich" ]; then
cd immich
echo "Attempting to start immich container ..."
$PROG compose -f docker-compose.yml up -d
cd ..
fi
2026-05-18 22:47:10 -04:00
if [ -d "mealie" ]; then
cd mealie
echo "Attempting to start mealie container ..."
$PROG compose -f docker-compose.yml up -d
cd ..
fi
echo "Program finished successfully!"