Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
1,028
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. version: '3.4'
  2. services:
  3. traefik:
  4. container_name: Traefik
  5. image: traefik
  6. # Enables the web UI and tells Traefik to listen to docker
  7. command:
  8. - --api.insecure=true
  9. - --providers.docker
  10. - --entryPoints.web.address=:80
  11. - --entryPoints.websecure.address=:443
  12. ports:
  13. # The HTTP port
  14. - "80:80"
  15. # The Web UI (enabled by --api.insecure=true)
  16. - "8080:8080"
  17. - "443:443"
  18. environment:
  19. - "CF_API_EMAIL=nuno_ng21@hotmail.com"
  20. - "CF_API_KEY=7ccbb8444d58b33f44266d158501622932835"
  21. volumes:
  22. # So that Traefik can listen to the Docker events
  23. - "/var/run/docker.sock:/var/run/docker.sock"
  24. - "${SETTINGS}/Traefik:/etc/traefik"
  25. - "${SETTINGS}/Traefik/certs:/certs" # Certificates localtion
  26. restart: always
  27. network_mode: host
  28.  
  29. Nextcloud:
  30. container_name: Nextcloud
  31. image: linuxserver/nextcloud
  32. restart: unless-stopped
  33. network_mode: bridge
  34. environment:
  35. - PUID=99
  36. - PGID=100
  37. ports:
  38. - 8081:80
  39. - 8282:443
  40. volumes:
  41. - "/mnt/user/appdata/containers/Nextcloud/config:/config"
  42. - "/mnt/user/Nextcloud:/data"
  43. # links:
  44. # - NextcloudDb
  45. labels:
  46. - "traefik.enable=true"
  47. - "traefik.http.routers.nextcloud-http.entrypoints=http"
  48. - "traefik.http.routers.nextcloud-http.rule=Host(`cloud.${DOMAIN}`)"
  49. - "traefik.http.routers.nextcloud-http.middlewares=https-redirect@file"
  50.  
  51. - "traefik.http.routers.nextcloud-https.entrypoints=https"
  52. - "traefik.http.routers.nextcloud-https.tls=true"
  53.  
  54. - "traefik.http.routers.nextcloud-https.rule=Host(`cloud.${DOMAIN}`)"
  55. - "traefik.http.routers.nextcloud-https=nextcloud"
  56. - "traefik.http.routers.nextcloud-https.service=nextcloud"
  57.  
  58. - "traefik.http.services.nextcloud.loadbalancer.server.port=443"
  59. - "traefik.http.services.nextcloud.loadbalancer.server.scheme=https"
  60. - "traefik.http.services.nextcloud.loadbalancer.passhostheader=true"
Advertisement
RAW Paste Data Copied
Advertisement