Skip to content

Instantly share code, notes, and snippets.

@rrmartins
Created July 2, 2024 11:35
Show Gist options
  • Save rrmartins/6226ab175ce456cf084b8ac3b2a95415 to your computer and use it in GitHub Desktop.
Save rrmartins/6226ab175ce456cf084b8ac3b2a95415 to your computer and use it in GitHub Desktop.
version: '3.2'
services:
db:
image: postgres:latest
environment:
- POSTGRES_PASSWORD=password
ports:
- "5432:5432"
volumes:
- "dbdata:/var/lib/postgresql/data"
redis:
image: redis:alpine
ports:
- "6379:6379"
web:
build: .
ports:
- "3000:3000"
depends_on:
- db
- redis
environment:
- DATABASE_URL=postgres://postgres:password@db:5432/postgres
- REDIS_URL=redis://redis:6379
- PORT=3000
volumes:
- .:/app
volumes:
dbdata:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment