feat: added setup script to generate volume directories

This commit is contained in:
2026-01-22 15:34:57 +01:00
parent 9e5e1e541e
commit e4aa9818a8
2 changed files with 20 additions and 2 deletions

View File

@@ -14,9 +14,9 @@ docker compose -f compose/<service name>/docker-compose.yml up -d
- [ ] Use .env files for volume binds
- [ ] Provide example .env files
- [x] Gitignore actual .env
- [ ] Gitignore folders and files in `volumes/`
- [x] Gitignore folders and files in `volumes/`
- [ ] Add README to every service describing required env variables, commands and volumes
- [ ] OPTIONAL: add a script that creates required dirs in `volumes/`
- [x] OPTIONAL: add a script that creates required dirs in `volumes/`
- [ ] OPTIONAL: add a script to backup all .env files
- [ ] OPTIONAL: add a script to backup everything
- [ ] OPTIONAL: Encrypt the backups with GPG

18
setup.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
volumes_root="./volumes"
volumes=(
filebrowser
)
mkdir -p "$volumes_root"
for volume in "${volumes[@]}"; do
volume_path="$volumes_root/$volume"
if [ ! -d "$volume_path" ]; then
mkdir -p "$volume_path"
echo "Created volume directory: $volume_path\n"
else
echo "Volume directory already exists: $volume_path\n"
fi
done