Created
          June 27, 2020 21:47 
        
      - 
      
 - 
        
Save swrogers/9989f0ceb8d4d6d87269d2b41729a6ab to your computer and use it in GitHub Desktop.  
    My traefik docker-compose.yml start
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | version: '3' | |
| services: | |
| reverse-proxy: | |
| image: traefik:v2.2 | |
| command: | |
| - "--api.insecure=true" | |
| - "--providers.docker" | |
| - "--providers.docker.exposedbydefault=false" | |
| - "--entrypoints.web.address=:80" | |
| - "--entrypoints.websecure.address=:443" | |
| - "--entrypoints.web.http.redirections.entrypoint.to=websecure" | |
| - "--entrypoints.web.http.redirections.entrypoint.scheme=https" | |
| - "--certificatesresolvers.myresolver.acme.httpchallenge=true" | |
| - "[email protected]" | |
| - "--certificatesresolvers.myresolver.acme.storage=/acme.json" | |
| - "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web" | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| - "8080:8080" | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock | |
| - ./acme.json:/acme.json | |
| whoami: | |
| image: "containous/whoami" | |
| container_name: "simple-service" | |
| labels: | |
| - "traefik.enable=true" | |
| - "traefik.http.routers.whoami.rule=Host(`whoami.swrlab.org`)" | |
| - "traefik.http.routers.whoami.entrypoints=websecure" | |
| - "traefik.http.routers.whoami.tls.certresolver=myresolver" | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment