Created
May 24, 2021 15:50
-
-
Save arielweinberger/a6ccf45fb7501fd1bd15bd5632ea9056 to your computer and use it in GitHub Desktop.
Running PostgreSQL via Docker
This file contains 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
i tried running this but the container exits as soon as it starts
Error: Database is uninitialized and superuser password is not specified.
You must specify POSTGRES_PASSWORD to a non-empty value for the
superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
connections without a password. This is not recommended.
See PostgreSQL documentation about "trust":