Created
September 8, 2020 15:12
-
-
Save lexfrei/77112cd362f81f0681fbd71a8e2b0215 to your computer and use it in GitHub Desktop.
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.7" | |
| volumes: | |
| traefik_data: {} | |
| ghost_data: {} | |
| commento_postgres_data: {} | |
| networks: | |
| internet: {} | |
| traefik: | |
| driver: overlay | |
| internal: true | |
| services: | |
| # https://hub.docker.com/_/traefik?tab=tags | |
| traefik: | |
| image: traefik:v2.3.0-rc4 | |
| networks: | |
| - traefik | |
| - internet | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock:ro | |
| - traefik_data:/acme/ | |
| - ./traefik/traefik.yml:/etc/traefik/traefik.yml | |
| ports: | |
| - target: 80 | |
| published: 80 | |
| mode: host | |
| - target: 443 | |
| published: 443 | |
| mode: host | |
| deploy: | |
| mode: global | |
| placement: | |
| constraints: | |
| - node.role == manager | |
| update_config: | |
| parallelism: 1 | |
| delay: 10s | |
| restart_policy: | |
| condition: any | |
| Service: | |
| image: sevice/service:latest | |
| networks: | |
| - traefik | |
| labels: | |
| - "traefik.enable=true" | |
| - "traefik.http.services.front.loadbalancer.server.port=666" | |
| - "traefik.http.services.back.loadbalancer.server.port=777" | |
| # Front route | |
| - "traefik.http.routers.front.service=front" | |
| - "traefik.http.routers.front.entrypoints=websecure" | |
| - "traefik.http.routers.front.rule=Host(`front.example.com`)" | |
| - "traefik.http.routers.front.tls.certresolver=prodssl" | |
| - "traefik.http.routers.front.tls=true" | |
| # Back Route | |
| - "traefik.http.routers.back.service=back" | |
| - "traefik.http.routers.back.entrypoints=websecure" | |
| - "traefik.http.routers.back.rule=Host(`front.example.com`)" | |
| - "traefik.http.routers.back.tls.certresolver=prodssl" | |
| - "traefik.http.routers.back.tls=true" | |
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
| global: | |
| checkNewVersion: true | |
| sendAnonymousUsage: false | |
| certificatesResolvers: | |
| prodssl: | |
| acme: | |
| email: "user@example.com" | |
| storage: "/acme/prod.json" | |
| tlsChallenge: {} | |
| providers: | |
| docker: | |
| watch: true | |
| network: "traefik" | |
| exposedByDefault: false | |
| file: | |
| watch: true | |
| filename: "/etc/traefik/traefik.yml" | |
| api: | |
| dashboard: true | |
| entryPoints: | |
| web: | |
| address: :80 | |
| http: | |
| redirections: | |
| entryPoint: | |
| to: websecure | |
| scheme: https | |
| websecure: | |
| address: :443 | |
| http: | |
| middlewares: | |
| - secHeaders@file | |
| - cache@file | |
| - compress@file | |
| http: | |
| middlewares: | |
| secHeaders: | |
| headers: | |
| sslRedirect: true | |
| stsIncludeSubdomains: true | |
| stspreload: true | |
| stsseconds: 31536000 | |
| cache: | |
| plugin: | |
| plugin-simplecache: | |
| path: /tmp | |
| compress: | |
| compress: {} | |
| experimental: | |
| pilot: | |
| token: "XXX" | |
| plugins: | |
| plugin-simplecache: | |
| moduleName: "github.com/containous/plugin-simplecache" | |
| version: "v0.1.1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment