Skip to content

Instantly share code, notes, and snippets.

@osbre
Created March 3, 2026 10:35
Show Gist options
  • Select an option

  • Save osbre/a56011ebfe9567a0c4e69c9bd91c4371 to your computer and use it in GitHub Desktop.

Select an option

Save osbre/a56011ebfe9567a0c4e69c9bd91c4371 to your computer and use it in GitHub Desktop.
compose for development. ~/compose.yml
services:
postgres:
image: postgres:18
container_name: postgres18
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres18_data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
retries: 5
redis:
image: redis:7
container_name: redis7
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
volumes:
postgres18_data:
redis_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment