Useful shell commands

Command

What does it do

Command

What does it do

df -h

Displays free space

bash ./helper.sh --execute <db container name> -- pg_dump 'postgresql://postgres:postgres@localhost/<db name>' --inserts > <out file name>

Generates a db backup

docker system prune -a

Removes unused Docker images

docker logs -f --tail=100 $(./helper.sh --docker -- ps -q <container name)

Displays single container logs, without container name prefix by docker-compose