Skip to content

Instantly share code, notes, and snippets.

@BTruer
Created June 13, 2023 19:18
Show Gist options
  • Save BTruer/d1a7f3130edaa09b3da085aaeb5f5f6c to your computer and use it in GitHub Desktop.
Save BTruer/d1a7f3130edaa09b3da085aaeb5f5f6c to your computer and use it in GitHub Desktop.
How to setup postgres
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