Skip to content

Instantly share code, notes, and snippets.

@svnlto
Created September 6, 2016 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save svnlto/5f7d39ef98f79b053f1903bb9da192ca to your computer and use it in GitHub Desktop.
Save svnlto/5f7d39ef98f79b053f1903bb9da192ca to your computer and use it in GitHub Desktop.
version: "2"
services:
loadbalancer:
image: traefik:latest
command: -c /dev/null --retry --retry.attempts=3 --web --docker --docker.domain=comae.io.192.168.99.100.xip.io --logLevel=INFO
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "80:80"
- "443:443"
- "8080:8080"
api-1:
image: comaeio/manager
environment:
- COMAE_MANAGER_MONGODB_URI=mongodb://mongodb:27017/manager
- COMAE_MANAGER_STORAGE_PROVIDER=local
- COMAE_MANAGER_DOCS_MODE=false
- NODE_ENV=development
expose:
- "3000"
depends_on:
- mongodb
labels:
- traefik.port=3000
- traefik.backend=api
- traefik.frontend.rule=Host:api.comae.io.192.168.99.100.xip.io
api-2:
image: comaeio/manager
environment:
- COMAE_MANAGER_MONGODB_URI=mongodb://mongodb:27017/manager
- COMAE_MANAGER_STORAGE_PROVIDER=local
- COMAE_MANAGER_DOCS_MODE=false
- NODE_ENV=development
expose:
- "3000"
depends_on:
- mongodb
labels:
- traefik.port=3000
- traefik.backend=api
- traefik.frontend.rule=Host:api.comae.io.192.168.99.100.xip.io
api-3:
image: comaeio/manager
environment:
- COMAE_MANAGER_MONGODB_URI=mongodb://mongodb:27017/manager
- COMAE_MANAGER_STORAGE_PROVIDER=local
- COMAE_MANAGER_DOCS_MODE=false
- NODE_ENV=development
expose:
- "3000"
depends_on:
- mongodb
labels:
- traefik.port=3000
- traefik.backend=api
- traefik.frontend.rule=Host:api.comae.io.192.168.99.100.xip.io
docs:
image: comaeio/manager
environment:
- COMAE_MANAGER_MONGODB_URI=mongodb://mongodb:27017/manager
- COMAE_MANAGER_STORAGE_PROVIDER=local
- COMAE_MANAGER_DOCS_MODE=true
- NODE_ENV=development
expose:
- "5000"
depends_on:
- mongodb
labels:
- traefik.port=5000
- traefik.backend=docs
- traefik.frontend.rule=Host:docs.api.comae.io.192.168.99.100.xip.io
mongodb:
image: comaeio/mongodb_seed:latest
ports:
- "27017:27017"
expose:
- "27017"
restart: always
labels:
- traefik.enable=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment