Forked from arielweinberger/gist:a6ccf45fb7501fd1bd15bd5632ea9056
Created
November 28, 2022 08:23
-
-
Save mohamedaboelmagd/efc44c24f83c7de30343c5b44e0578e8 to your computer and use it in GitHub Desktop.
Running PostgreSQL via Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### This gist is a part of the NestJS Zero to Hero course on Udemy. | |
### https://www.udemy.com/course/nestjs-zero-to-hero/?referralCode=F672C0C701844DC91F4D | |
To run PostgreSQL on Docker, run the following in your Terminal: | |
docker run --name postgres-nest -p 5432:5432 -e POSTGRES_PASSWORD=postgres -d postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo lsof -i :5432
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
postgres 1937 postgres 5u IPv4 37521 0t0 TCP localhost:postgresql (LISTEN)
(base) mohamed@mohamed-hp-probook-450-g4:
$ sudo kill -9 1937$ sudo lsof -i :5432(base) mohamed@mohamed-hp-probook-450-g4:
sudo docker start 1ca9bcdee5bd306095ceaa3343cfdccc26d655b99e668c601f00df0900aa88b2