Skip to content

Instantly share code, notes, and snippets.

@kmankan
Last active November 11, 2024 20:19
Show Gist options
  • Save kmankan/e2d9414a15a669af21840cce146e7201 to your computer and use it in GitHub Desktop.
Save kmankan/e2d9414a15a669af21840cce146e7201 to your computer and use it in GitHub Desktop.
docker-compose-postgres-template
services:
postgres-1:
image: postgres:14
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: replace-with-db-name
command:
- "postgres"
- "-c"
- "fsync=off"
- "-c"
- "full_page_writes=off"
- "-c"
- "synchronous_commit=off"
- "-c"
- "max_connections=500"
ports:
- "10017:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment