Files
DockerConfigs/scripts/run-all.sh
2024-11-15 19:47:19 -06:00

45 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Define the path to the .env file (root-level)
ENV_FILE="/mnt/docker/.env"
# Base directory where the service Compose files are located
COMPOSE_DIR="/mnt/docker/docker-compose.d"
# List of service directories under docker-compose.d
services=(
"Documentation/bookstack.yml"
"Documentation/gitea.yml"
"Documentation/vaultwarden.yml"
"Media/arr.yml"
"Media/jellyfin.yml"
"Media/shoko.yml"
"Networking/technitium.yml"
"Networking/caddy.yml"
"Networking/omada.yml"
"Tools/searxng.yml"
"Tools/monerod.yml"
"Tools/p2pool.yml"
"Tools/ariang.yml"
"Tools/nextcloud-aio.yml"
"Tools/qbit.yml"
"Tools/open-webui.yml"
"pterodactyl/docker-compose.yml"
)
# Start building the docker compose command with multiple -f flags
COMPOSE_COMMAND="docker compose --env-file \"$ENV_FILE\""
# Loop through each service and append the -f flag for each compose file
for service in "${services[@]}"; do
COMPOSE_COMMAND+=" -f \"$COMPOSE_DIR/$service\""
done
# Add the up command to the final docker compose command
COMPOSE_COMMAND+=" up -d"
# Execute the composed command
eval $COMPOSE_COMMAND
echo "All services have been started."