Last active
August 7, 2016 11:51
-
-
Save lucj/2ee78bbcb85dc105a74e1d7fa8bea165 to your computer and use it in GitHub Desktop.
compose-example-1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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