mirror of
https://github.com/harivansh-afk/betterNAS.git
synced 2026-04-15 08:03:42 +00:00
add local dev setup
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
parent
e5619bb002
commit
540313016b
5 changed files with 217 additions and 0 deletions
9
scripts/dev-down
Executable file
9
scripts/dev-down
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
compose_file="$repo_root/docker/compose.dev.yml"
|
||||
|
||||
docker compose -f "$compose_file" down --remove-orphans
|
||||
|
||||
28
scripts/dev-up
Executable file
28
scripts/dev-up
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
compose_file="$repo_root/docker/compose.dev.yml"
|
||||
|
||||
docker compose -f "$compose_file" up -d --build
|
||||
|
||||
echo "Waiting for Nextcloud to finish installing..."
|
||||
ready=0
|
||||
for _ in {1..60}; do
|
||||
if docker compose -f "$compose_file" exec -T --user www-data nextcloud php occ status >/dev/null 2>&1; then
|
||||
ready=1
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
|
||||
if [[ "$ready" -ne 1 ]]; then
|
||||
echo "Nextcloud did not become ready in time." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker compose -f "$compose_file" exec -T --user www-data nextcloud php occ app:enable --force ainascontrolplane >/dev/null
|
||||
|
||||
echo "Nextcloud: http://localhost:8080"
|
||||
echo "aiNAS control plane: http://localhost:3001"
|
||||
Loading…
Add table
Add a link
Reference in a new issue