Skip to content

Instantly share code, notes, and snippets.

@janajri
Last active November 25, 2015 07:27
Show Gist options
  • Save janajri/f3100715d608bfc4f335 to your computer and use it in GitHub Desktop.
Save janajri/f3100715d608bfc4f335 to your computer and use it in GitHub Desktop.
Tututm ha proxy example
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
@janajri
Copy link
Author

janajri commented Nov 19, 2015

frontend can be listening on 80, and haproxy will handle ssl termination and forward to frontend based off of implicit linkage.

@janajri
Copy link
Author

janajri commented Nov 19, 2015

--------BEGIN CERT------\n
randomhash\n
--------END CERT------\n
--------PUBLIC CERT------\n
randomhash\n
--------END CERT------

@anlek
Copy link

anlek commented Nov 25, 2015

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