Skip to content

Instantly share code, notes, and snippets.

@yusufsyaifudin
Last active May 6, 2020 08:18
Show Gist options
  • Save yusufsyaifudin/ca6ba553b71904c88672963521a752c4 to your computer and use it in GitHub Desktop.
Save yusufsyaifudin/ca6ba553b71904c88672963521a752c4 to your computer and use it in GitHub Desktop.
docker compose for postgresql 12
# run with: docker-compose -f postgres.yml up
# psql "postgres://postgres:postgres@localhost:5433"
version: '3.1'
services:
db:
image: postgres:12-alpine
restart: always
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
volumes:
- ./pgdata:/var/lib/postgresql/data
ports:
- 5433:5432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment