Skip to content

Instantly share code, notes, and snippets.

@lucj
Last active August 7, 2016 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucj/2ee78bbcb85dc105a74e1d7fa8bea165 to your computer and use it in GitHub Desktop.
Save lucj/2ee78bbcb85dc105a74e1d7fa8bea165 to your computer and use it in GitHub Desktop.
compose-example-1
version: '2'
services:
# Data store
db:
image: mongo:3.2
volumes:
- mongo-data:/data/db
expose:
- "27017"
# Session store
kv:
image: redis:3.0.7-alpine
volumes:
- redis-data:/data
exposes:
- "6379"
# web front-end
web:
build: web
expose:
- "80"
links:
- kv
environment:
- KV_STORE=kv
# api back-end
api:
build: api
expose:
- "80"
links:
- db
- kv environment:
- MONGODB_URL=mongodb://db/testdb
- KV_STORE=kv
# Proxy
proxy:
build: proxy
links:
- api
- web
ports:
- "80:80"
- "8000:8000"
volumes:
mongo-data:
redis-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment