feat: added setup script to generate volume directories
This commit is contained in:
@@ -14,9 +14,9 @@ docker compose -f compose/<service name>/docker-compose.yml up -d
|
|||||||
- [ ] Use .env files for volume binds
|
- [ ] Use .env files for volume binds
|
||||||
- [ ] Provide example .env files
|
- [ ] Provide example .env files
|
||||||
- [x] Gitignore actual .env
|
- [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
|
- [ ] 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 all .env files
|
||||||
- [ ] OPTIONAL: add a script to backup everything
|
- [ ] OPTIONAL: add a script to backup everything
|
||||||
- [ ] OPTIONAL: Encrypt the backups with GPG
|
- [ ] OPTIONAL: Encrypt the backups with GPG
|
||||||
18
setup.sh
Executable file
18
setup.sh
Executable 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
|
||||||
Reference in New Issue
Block a user