rorenv/92-teardown-postgres.sh

15 lines
440 B
Bash
Executable File

#!/bin/bash
SCRIPTHOME=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPTHOME
sudo docker compose -f postgres/docker-compose.yml stop
sudo docker container rm -f postgres
sudo docker container prune -f
sudo docker network rm postgres_default
sudo docker volume rm -f postgres_postgres
sudo docker image rm -f postgres
sudo docker image prune -f
sudo docker builder prune -f
sudo apt -y purge libpq-dev libpq5