mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-04-27 17:16:57 +00:00
53 lines
1.2 KiB
Bash
Executable file
53 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
read -p "Reset databases? [y/N] " cleardb
|
|
|
|
case $cleardb in
|
|
[Yy] )
|
|
echo "Clearning postgres..."
|
|
rm -rf ./db
|
|
sleep 1
|
|
echo "Clearing redis..."
|
|
rm -rf ./redis
|
|
sleep 1
|
|
;;
|
|
* )
|
|
;;
|
|
esac
|
|
|
|
cp .config/ci.yml .config/default.yml
|
|
cp .config/ci.yml .config/test.yml
|
|
cp .config/docker_ci.env .config/docker.env
|
|
cp compose.local-dev.yml compose.yml
|
|
|
|
echo Creating environment...
|
|
docker compose up -d
|
|
docker compose exec web apt-get update
|
|
docker compose exec web apt-get install -y bash
|
|
|
|
echo Installing dependencies...
|
|
docker compose exec web apt-get install -y git wget curl build-essential python3 ffmpeg libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
|
|
docker compose exec web corepack enable
|
|
docker compose exec web corepack prepare pnpm@latest --activate
|
|
docker compose exec web git submodule update --init
|
|
docker compose exec web pnpm install --frozen-lockfile
|
|
|
|
echo Environment is ready.
|
|
echo 5173 for dev, and 3000 for prod.
|
|
echo Do not forget to \`pnpm migrate\` before your first launch!
|
|
docker compose exec web bash
|
|
|
|
echo Stopping containers...
|
|
docker compose stop
|
|
|
|
read -p "Delete containers? [y/N] " scrubContainers
|
|
|
|
case $scrubContainers in
|
|
[Yy] )
|
|
docker compose down
|
|
;;
|
|
* )
|
|
;;
|
|
esac
|
|
|
|
rm -f compose.yml
|