chancem

Service Docker-Compose Example

Nov 30th, 2020
786
122 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. version: '3.7'
  2.  
  3. services:
  4.   minio:
  5.     image: minio/minio
  6.     restart: always
  7.     command: server /data
  8.     environment:
  9.      - MINIO_ACCESS_KEY=###
  10.       - MINIO_SECRET_KEY=###
  11.     labels:
  12.      - "traefik.enable=true"
  13.       - "traefik.http.routers.minio.rule=Host(`example.org`)"
  14.       - "traefik.http.routers.minio.entrypoints=http"
  15.       - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
  16.       - "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
  17.       - "traefik.http.middlewares.hsts-header.headers.stspreload=true"
  18.       - "traefik.http.middlewares.hsts-header.headers.stsseconds=63072000"
  19.       - "traefik.http.middlewares.hsts-header.headers.sslredirect=true"
  20.       - "traefik.http.middlewares.hsts-header.headers.forcestsheader=true"
  21.       - "traefik.http.routers.minio.middlewares=redirect-to-https"
  22.       - "traefik.http.routers.minio-https.rule=Host(`example.org`)"
  23.       - "traefik.http.routers.minio-https.entrypoints=https"
  24.       - "traefik.http.middlewares.compress.compress=true"
  25.       - "traefik.http.routers.minio-https.tls=true"
  26.       - "traefik.http.routers.minio-https.tls.certresolver=ACME"
  27.       - "traefik.http.routers.minio-https.middlewares=hsts-header,compress"
  28.     networks:
  29.      - web
  30.     volumes:
  31.      - $PWD/data:/data
  32. networks:
  33.   web:
  34.     external: true
RAW Paste Data