Skip to content

Instantly share code, notes, and snippets.

@hairyhenderson
Last active August 28, 2016 13:49
Show Gist options
  • Save hairyhenderson/526325ba383cb458c7dead0f2f864f98 to your computer and use it in GitHub Desktop.
Save hairyhenderson/526325ba383cb458c7dead0f2f864f98 to your computer and use it in GitHub Desktop.
Why u no like redirect???
version: '2'
services:
web:
restart: always
image: emilevauge/whoami
labels:
- "traefik.port=80"
- "traefik.frontend.rule=Host:hairyhenderson.ca"
frontend:
restart: always
image: traefik
command: |-
--web
--docker --docker.domain=hairyhenderson.ca
--logLevel=DEBUG
--acme --acme.email=dhenderson@gmail.com --acme.ondemand
--acme.entrypoint=https --acme.storageFile=/certs/acme.json
--acme.domains='hairyhenderson.ca'
--entryPoints='Name:https Address::443 TLS'
--entryPoints='Name:http Address::80 Redirect.EntryPoint:https'
--defaultentrypoints='http,https'
labels:
- "traefik.enable=false"
ports:
- "80:80"
- "443:443"
- "0.0.0.0:8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/traefik.toml
- certStorage:/certs
volumes:
certStorage:
driver: local
@hairyhenderson
Copy link
Author

Updated - works now! Just needed to add http to --defaultentrypoints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment