Skip to content

Instantly share code, notes, and snippets.

@muresan
Last active October 9, 2017 10:55
Show Gist options
  • Save muresan/250cf28b75a451bede10bea7830f87f0 to your computer and use it in GitHub Desktop.
Save muresan/250cf28b75a451bede10bea7830f87f0 to your computer and use it in GitHub Desktop.
Traefik on rancher
version: '2'
services:
helloworld:
image: muresan/node-helloworld:1.2
labels:
traefik.frontend.rule: Host:www.helloworld.com,helloworld.com
traefik.port: '3000'
traefik.enable: 'true'
traefik.protocol: 'http'
traefik.frontend.entryPoints: 'http'
io.rancher.container.hostname_override: container_name
io.rancher.container.pull_image: always
version: '2'
services:
traefik:
image: traefik:1.4-alpine
ports:
- 8080:8080/tcp
- 80:80/tcp
- 443:443/tcp
command:
- --web
- --rancher
- --rancher.exposedbydefault=false
- --rancher.metadata=true
- --logLevel=INFO
labels:
io.rancher.container.agent.role: environment
io.rancher.container.create_agent: 'true'
io.rancher.container.pull_image: always
io.rancher.scheduler.global: 'true'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment