Created
October 26, 2023 13:36
-
-
Save tamtakoe/d601a68342282375e92b35bb5b8554c7 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.9" | |
services: | |
my-service: | |
image: my-service:latest | |
deploy: | |
replicas: 1 | |
restart_policy: | |
condition: on-failure | |
labels: | |
- traefik.enable=true | |
- traefik.http.services.my-service.loadbalancer.server.port=8080 | |
- traefik.http.middlewares.https-redirect.redirectscheme.scheme=https | |
- traefik.http.middlewares.https-redirect.redirectscheme.permanent=true | |
- traefik.http.routers.my-service-http.rule=Host(`example.com`) | |
- traefik.http.routers.my-service-http.entrypoints=http | |
- traefik.http.routers.my-service-http.middlewares=https-redirect | |
- traefik.http.routers.my-service-https.rule=Host(`example.com`) | |
- traefik.http.routers.my-service-https.entrypoints=https | |
- traefik.http.routers.my-service-https.tls=true | |
- traefik.http.routers.my-service-https.tls.certresolver=le | |
networks: | |
- traefik-public | |
networks: | |
traefik-public: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment