Skip to content

Instantly share code, notes, and snippets.

@austinfrey
Last active January 17, 2023 16:25
Show Gist options
  • Select an option

  • Save austinfrey/58b3bb5a9d10a3214b376e33ea84bdc8 to your computer and use it in GitHub Desktop.

Select an option

Save austinfrey/58b3bb5a9d10a3214b376e33ea84bdc8 to your computer and use it in GitHub Desktop.

Revisions

  1. austinfrey revised this gist Jan 17, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion sample-traefik-setup.yml
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ services:
    --defaultEntryPoints='http,https'
    --acme=true
    --acme.domains='yourdomain.com,www.yourdomain.com'
    --acme.email=[email protected]
    --acme.email=
    --acme.ondemand=true
    --acme.onhostrule=true
    --acme.storage=/etc/traefik/acme/acme.json
  2. @aafrey aafrey revised this gist Apr 3, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions sample-traefik-setup.yml
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ services:
    deploy:
    labels:
    - traefik.port=8080
    - traefik.frontend.rule=PathPrefix:/function
    - traefik.frontend.rule=Host:yourdomain.com,www.yourdomain.com
    placement:
    constraints: [node.role == manager]

    @@ -26,7 +26,7 @@ services:
    --debug=true
    --defaultEntryPoints='http,https'
    --acme=true
    --acme.domains='austinfrey.com,www.austinfrey.com'
    --acme.domains='yourdomain.com,www.yourdomain.com'
    [email protected]
    --acme.ondemand=true
    --acme.onhostrule=true
  3. @aafrey aafrey revised this gist Apr 3, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion sample-traefik-setup.yml
    Original file line number Diff line number Diff line change
    @@ -49,7 +49,7 @@ services:

    networks:
    traefik-net:
    external: true
    driver: overlay

    volumes:
    portainer:
  4. @aafrey aafrey created this gist Mar 28, 2017.
    56 changes: 56 additions & 0 deletions sample-traefik-setup.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,56 @@
    version: "3"

    services:
    # FaaS API Gateway
    gateway:
    volumes:
    - "/var/run/docker.sock:/var/run/docker.sock"
    image: alexellis2/faas-gateway:latest
    networks:
    - traefik-net
    deploy:
    labels:
    - traefik.port=8080
    - traefik.frontend.rule=PathPrefix:/function
    placement:
    constraints: [node.role == manager]

    # Traefik: Dynamic Reverse Proxy
    traefik:
    image: traefik:latest
    command: -c --docker=true
    --docker.swarmmode=true
    --docker.domain=traefik
    --docker.watch=true
    --web=true
    --debug=true
    --defaultEntryPoints='http,https'
    --acme=true
    --acme.domains='austinfrey.com,www.austinfrey.com'
    [email protected]
    --acme.ondemand=true
    --acme.onhostrule=true
    --acme.storage=/etc/traefik/acme/acme.json
    --acme.entrypoint=https
    --entryPoints='Name:https Address::443 TLS'
    --entryPoints='Name:http Address::80 Redirect.EntryPoint:https'
    ports:
    - 80:80
    - 8080:8080
    - 443:443
    volumes:
    - "/var/run/docker.sock:/var/run/docker.sock"
    - "acme:/etc/traefik/acme"
    networks:
    - traefik-net
    deploy:
    placement:
    constraints: [node.role == manager]

    networks:
    traefik-net:
    external: true

    volumes:
    portainer:
    acme: