-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
32 lines (25 loc) · 933 Bytes
/
build.sh
File metadata and controls
32 lines (25 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# Monastery — One-command build & deploy
# Usage: ./build.sh
set -e
echo "=== Monastery Build ==="
# Detect if BuildKit is problematic (common in LXC/Proxmox environments)
# and disable it automatically for reliable builds.
if [ -f /.dockerenv ] || grep -q container=lxc /proc/1/environ 2>/dev/null; then
echo "[info] LXC/container environment detected — using classic builder"
export DOCKER_BUILDKIT=0
fi
echo "[1/2] Building Monastery image..."
docker compose build --no-cache
echo "[2/2] Starting Monastery..."
docker compose up -d
echo "[3/3] Cleaning up build artifacts..."
docker builder prune -a -f 2>/dev/null || true
docker image prune -a -f 2>/dev/null || true
echo ""
echo "=== Monastery is running! ==="
echo "Open: http://localhost:3000"
echo "Health check: http://localhost:3000/api/health"
echo ""
echo "To stop: docker compose down"
echo "To view logs: docker compose logs -f"