Skip to content

Instantly share code, notes, and snippets.

@johnfitzpatrick
Last active March 21, 2019 14:38
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 johnfitzpatrick/199c9e5697a7f0fa9d98b40e1c16fcee to your computer and use it in GitHub Desktop.
Save johnfitzpatrick/199c9e5697a7f0fa9d98b40e1c16fcee to your computer and use it in GitHub Desktop.
version: '3'
services:
mongodb:
image: core/mongodb
command: --peer ${HOSTIP}
environment:
HAB_MONGODB: "[mongod.net]\nbind_ip = '0.0.0.0'\n[mongod.security]\ncluster_auth_mode = ''"
national-parks01:
image: MYORIGIN/national-parks:latest
command: --peer mongodb --strategy at-once --bind database:mongodb.default
national-parks02:
image: MYORIGIN /national-parks:latest
command: --peer mongodb --strategy at-once --bind database:mongodb.default
haproxy:
image: core/haproxy:latest
command: --peer mongodb --bind backend:national-parks.default
ports:
- 8085:8085
- 8000:8000
environment:
HAB_HAPROXY: "maxconn = '32'\nhttpchk = 'GET /national-parks'\n[front-end]\nlisten = '*'\nport = '8085'\nmode = 'http'\n[status]\nenabled = false\nlisten = '*'\nport = '8000'\nuser = 'admin'\npassword = 'password'\nuri = '/haproxy-stats'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment