#!/usr/bin/env bash

# read -p "Press Enter to start..."

set -x

docker compose kill
docker compose down
sudo rm -rf ./volumes/pocketbase/pb_data/*

set -ex

sudo chown 1000:1000 -R ./volumes
sudo rm -rf ./volumes/*

docker compose build
docker compose up -d
# docker compose logs -f

echo "please run yourself !!!!"
echo "yarn nodemon -w /pb_hooks --exec "pocketbase seed""
echo ""
docker compose exec -it pocketbase sh
