You are on page 1of 1

docker exec -it systems-puzzle-master_db_1 bash

Now you are ‘inside’ your container. We can access postgres and create the
database.

psql -h localhost -p 5432 -U postgres -W


password: postgres

\c dbname (eg:flaskapp_db)

CMD:
----
\l (shows list of dbs)

\q (quit)

\dt (to show tables)

docker exec -it systems-puzzle-master_db_1 bash

ctrl + d

create a role/user in postgres sql db:


======================================
createuser --interactive --pwprompt

\du (to show list of all users)

You might also like