Skip to content

Instantly share code, notes, and snippets.

@josetapadas
Created January 23, 2017 11:00
Show Gist options
  • Save josetapadas/dbf35e9767ca77e83b154f740ff70f66 to your computer and use it in GitHub Desktop.
Save josetapadas/dbf35e9767ca77e83b154f740ff70f66 to your computer and use it in GitHub Desktop.
Adding redis to the composition
version: '2'
services:
database:
image: postgres
volumes:
- ./data/pgdata:/pgdata
env_file:
- '.env'
web:
links:
- database
- redis
build: .
volumes:
- .:/opt/fooapp
ports:
- '3000:3000'
command: [bundle, exec, puma]
env_file:
- '.env'
redis:
image: 'redis:3.2-alpine'
command: redis-server
ports:
- '6379:6379'
volumes:
- './data/redisdata:/var/lib/redis/data'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment