Last active
November 25, 2015 07:27
-
-
Save janajri/f3100715d608bfc4f335 to your computer and use it in GitHub Desktop.
Tututm ha proxy example
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
haproxy: | |
image: 'tutum/haproxy:latest' | |
environment: | |
- DEFAULT_SSL_CERT='***' | |
links: | |
-frontend | |
ports: | |
- '80:80' | |
- '443:443' | |
restart: always | |
roles: | |
- global | |
frontend: | |
image: 'tutum.co/test/frontend:latest' | |
environment: | |
- VIRTUAL_HOST=https://frontend.domain.com,http://frontend.domain.com | |
target_num_containers: 2 | |
--------BEGIN CERT------\n
randomhash\n
--------END CERT------\n
--------PUBLIC CERT------\n
randomhash\n
--------END CERT------
It's also important to set VIRTUAL_HOST=**https://**frontend.domain.com!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
frontend can be listening on 80, and haproxy will handle ssl termination and forward to frontend based off of implicit linkage.