Created
September 17, 2015 12:38
-
-
Save molinto/b64ff441f29469fe863f to your computer and use it in GitHub Desktop.
Microservices nodejs
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
## from example: https://github.com/ibmjstart/Microservices/tree/split ## | |
productapi: | |
build: ./services/productAPI | |
ports: | |
- "49760:8080" | |
cartapi: | |
build: ./services/cartAPI | |
ports: | |
- "49761:8080" | |
reviewapi: | |
build: ./services/reviewsAPI | |
ports: | |
- "49762:8080" | |
storeclient: | |
build: . | |
ports: | |
- "49763:8080" |
Working!!
storeclient:
build: .
ports:
- "80:8080"
productapi:
build: ./services/productAPI
ports:
- "8080"
cartapi:
build: ./services/cartAPI
ports:
- "8080"
reviewapi:
build: ./services/reviewsAPI
ports:
- "8080"
######################################################
## PRODUCT PROXY
######################################################
product-proxy:
image: tutum/haproxy
links:
- productapi
ports:
- "7070:80"
environment:
- BACKEND_PORT=5000
- BALANCE=roundrobin
######################################################
## CART PROXY
######################################################
cart-proxy:
image: tutum/haproxy
links:
- cartapi
ports:
- "7080:80"
environment:
- BACKEND_PORT=5000
- BALANCE=roundrobin
######################################################
## REVIEW PROXY
######################################################
review-proxy:
image: tutum/haproxy
links:
- reviewapi
ports:
- "7090:80"
environment:
- BACKEND_PORT=5000
- BALANCE=roundrobin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure which service you would like to Load Balance. But you just need to expose port 5000 to the LB and add the LB section to your yml file. Hope this helps