Created
June 13, 2023 19:18
-
-
Save BTruer/d1a7f3130edaa09b3da085aaeb5f5f6c to your computer and use it in GitHub Desktop.
How to setup postgres
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
Have docker installed on your machine. | |
Copy this file: | |
docker-compose.yml | |
# Use postgres/example user/password credentials | |
version: '3.1' | |
#https://hub.docker.com/_/postgres/ | |
services: | |
db: | |
image: postgres | |
restart: always | |
ports: | |
- 5432:5432 | |
environment: | |
POSTGRES_PASSWORD: example | |
POSTGRES_DB: db | |
then in the terminal/cmd run `docker-compose up` | |
tehn use pgadmin or psql to connect to the db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment