Skip to content

Instantly share code, notes, and snippets.

@endurance
Created May 4, 2020 14:01
Show Gist options
  • Save endurance/69cbff6b4fe3ce160475889beac1195e to your computer and use it in GitHub Desktop.
Save endurance/69cbff6b4fe3ce160475889beac1195e to your computer and use it in GitHub Desktop.
version: '3.3'
services:
db:
image: library/postgres:11.1-alpine
# Docker for Mac does not support tmpfs mounts. If on linux, uncomment this out for a great performance boost
# volumes:
# - type: tmpfs
# target: /var/lib/postgresql/data
# DockerDisk should be mapped to a ram disk
# volumes:
# - type: bind
# source: /Volumes/DockerDisk/data
# target: /var/lib/postgresql/data
# consistency: cached
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: proto
ports:
- 5432:5432
command: postgres -c fsync=false -c synchronous_commit=off -c full_page_writes=off -c random_page_cost=1.0 -c max_wal_size=4GB -c checkpoint_timeout=86400
shm_size: 128M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment