Skip to content

Instantly share code, notes, and snippets.

@endurance
Created May 4, 2020 14:02
Show Gist options
  • Save endurance/2109a22cb850d520bf94c5ea47b95bdb to your computer and use it in GitHub Desktop.
Save endurance/2109a22cb850d520bf94c5ea47b95bdb 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, but osx filesystem event API is horribad right now. When
# Docker fixes the filesystem sync performance cost, we can uncomment this out for a local performance boost
# 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