Skip to content

Instantly share code, notes, and snippets.

@aolufisayo
Created December 1, 2020 07:35
Show Gist options
  • Save aolufisayo/ede8b82288dcd44aa7f407f5847def34 to your computer and use it in GitHub Desktop.
Save aolufisayo/ede8b82288dcd44aa7f407f5847def34 to your computer and use it in GitHub Desktop.
docker commands for running postgresql with django

check running docker services

docker ps

open bash command prompt on postgres container

docker exec -it 'postgres container name' bash

login to postgres

psql -U postgres

create a database

CREATE DATABASE 'database name';

list databases

\l

connect to a database

\c 'database name'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment