1
0
Fork 0
mirror of https://git.sr.ht/~roxwize/mipilin synced 2025-01-31 02:53:36 +00:00
mipilin/reset.sh

12 lines
372 B
Bash
Raw Normal View History

#!/bin/sh
sudo systemctl start docker
sudo docker container stop postgres
sudo docker container rm postgres
sudo docker run --name postgres -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 postgres
echo "Pausing for one second to give docker time to process what the fuck just happened"
sleep 1
./node_modules/.bin/drizzle-kit migrate
echo
echo "Database reset and running"