Skip to content

Instantly share code, notes, and snippets.

@corusm
Created February 5, 2021 13:38
Show Gist options
  • Save corusm/f36fc12022668ee1972f004fd46385f6 to your computer and use it in GitHub Desktop.
Save corusm/f36fc12022668ee1972f004fd46385f6 to your computer and use it in GitHub Desktop.
Mailocow tutorial test docker-compose
version: '3.7'
networks:
main:
external: true
services:
whoami:
image: "containous/whoami"
container_name: Traefik-whoami-main
restart: always
networks:
- "main"
labels:
- traefik.enable=true
- traefik.http.routers.whoami.rule=Host(`mail.example.com`) # Change to your email subdomain
- traefik.http.routers.whoami.entrypoints=web
- traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
- traefik.http.routers.whoami.middlewares=redirect-to-https@docker
- traefik.http.routers.whoami-secured.rule=Host(`mail.example.com`) # Change to your email subdomain
- traefik.http.routers.whoami-secured.tls=true
- traefik.http.routers.whoami-secured.tls.certresolver=myhttpchallenge
- traefik.http.routers.whoami-secured.entrypoints=web-secure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment