diff --git a/README.md b/README.md index a4f9367..8bbccef 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ docker compose -f compose//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 \ No newline at end of file diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..3c2ebfb --- /dev/null +++ b/setup.sh @@ -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 \ No newline at end of file