Skip to content

Instantly share code, notes, and snippets.

@mrserverless
Last active March 1, 2017 09:56
Show Gist options
  • Save mrserverless/203de80f74eb265c7161 to your computer and use it in GitHub Desktop.
Save mrserverless/203de80f74eb265c7161 to your computer and use it in GitHub Desktop.
Tutum HAProxy sample Stackfile for Virtual Host + SSL setup
hello:
image: 'tutum/hello-world:latest'
environment:
- FORCE_SSL=yes
- 'VIRTUAL_HOST=http://hello.example.com, https://hello.example.com'
ports:
- '80'
web:
image: 'example/web-site:latest'
environment:
- FORCE_SSL=yes
- 'VIRTUAL_HOST=http://www.example.com, https://www.example.com'
ports:
- '9000'
router:
image: 'tutum/haproxy:latest'
deployment_strategy: every_node
environment:
- 'BACKEND_PORTS=9000,80'
- 'DEFAULT_SSL_CERT=YOUR_PKEY+PUBLIC_CERT
- 'RSYSLOG_DESTINATION=logs2.papertrailapp.com:25417'
links:
- hello
- www
ports:
- '80:80'
- '443:443'
- '1936:1936'
privileged: true
restart: always
roles:
- global
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment