Docker Swarm : Stack Drawio

Docker Swarm : Stack Drawio

Table of Contents

Informations importantes

Fichier stack.yml

version: '3.3'

services:
  drawio:
    image: jgraph/drawio
    networks:
      - traefik-public
    deploy:
      #resources:
        #limits:
          #cpus: '0.50'
          #memory: 1024M
        #reservations:
          #cpus: '0.25'
          #memory: 512M
      labels:
        - traefik.enable=true
        - traefik.docker.network=traefik-public
        - traefik.constraint-label=traefik-public
        # Indiquer l'URL d'accès à l'application
        - traefik.http.routers.drawio-http.rule=Host(url.application.com)
        - traefik.http.routers.drawio-http.entrypoints=http
        - traefik.http.routers.drawio-http.middlewares=https-redirect
        # Indiquer l'URL d'accès à l'application
        - traefik.http.routers.drawio-https.rule=Host(url.application.com)
        - traefik.http.routers.drawio-https.entrypoints=https
        - traefik.http.routers.drawio-https.tls=true
        - traefik.http.routers.drawio-https.tls.certresolver=le
        - traefik.http.middlewares.hsts-headers.headers.stsSeconds=315360000
        - traefik.http.middlewares.hsts-headers.headers.stsPreload=true
        - traefik.http.middlewares.hsts-headers.headers.stsIncludeSubdomains=true
        - traefik.http.middlewares.hsts-headers.headers.customFrameOptionsValue=SAMEORIGIN
        - traefik.http.middlewares.hsts-headers.headers.sslRedirect=true
        - traefik.http.middlewares.hsts-headers.headers.forceSTSHeader=true
        - traefik.http.middlewares.hsts-headers.headers.referrerPolicy=same-origin
        - traefik.http.routers.drawio-https.middlewares=hsts-headers
        - traefik.http.services.drawio.loadbalancer.server.port=8080

networks:
  traefik-public:
    external: true

Déploiement

docker stack deploy -c stack.yml drawio

Accès

Les commentaires sont fermés.