Created
June 20, 2016 04:04
-
-
Save lopezjurip/307f7e757810ab44def5dd919fbce9e3 to your computer and use it in GitHub Desktop.
HAProxy: expose containers with subdomains
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
webclient: | |
environment: | |
- NODE_ENV=production | |
- VIRTUAL_HOST=myapp.com | |
build: 'webclient' # this directory must have a Dockerfile | |
links: | |
- mongo | |
restart: always | |
lb: | |
image: 'dockercloud/haproxy' | |
links: | |
- webclient | |
- api | |
ports: | |
- '80:80' | |
restart: always | |
api: | |
environment: | |
- NODE_ENV=production | |
- VIRTUAL_HOST=api.myapp.com | |
build: 'server' # this directory must have a Dockerfile | |
links: | |
- mongo | |
restart: always | |
mongo: | |
image: 'mongo:latest' | |
restart: always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment