#!/usr/bin/env bash # Build a new version and (re)start Spendlight with it. set -euo pipefail cd "$(dirname "$0")/.." if [ ! -f .env ]; then cp .env.example .env echo "Created .env from .env.example; review it, then run this again if needed." fi # Read the folder settings so the bind mounts exist and belong to this user # (otherwise Docker creates them as root and the app can't write). set -a; . ./.env; set +a mkdir -p "${DATA_PATH:-./data}" "${BACKUP_PATH:-./backups}" scripts/build.sh docker compose up -d echo "Spendlight $(cat VERSION) is starting on port ${HOST_PORT:-8095}."