Skip to content

Instantly share code, notes, and snippets.

@marttp
Created April 27, 2023 03:33
Show Gist options
  • Save marttp/7f975e283b685657bbfc4845270de4e9 to your computer and use it in GitHub Desktop.
Save marttp/7f975e283b685657bbfc4845270de4e9 to your computer and use it in GitHub Desktop.
Docker compose with PostgreSQL and Redis Stack
version: '3.1'
services:
db:
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: p@ssw0rd
POSTGRES_DB: book
ports:
- "5432:5432"
volumes:
- postgres_dev:/var/lib/postgresql/data
redis:
image: "redis/redis-stack:latest"
ports:
- "6379:6379"
- "8001:8001"
environment:
- REDIS_REPLICATION_MODE=master
volumes:
postgres_dev:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment