Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.4'
- services:
- traefik:
- container_name: Traefik
- image: traefik
- # Enables the web UI and tells Traefik to listen to docker
- command:
- - --api.insecure=true
- - --providers.docker
- - --entryPoints.web.address=:80
- - --entryPoints.websecure.address=:443
- ports:
- # The HTTP port
- - "80:80"
- # The Web UI (enabled by --api.insecure=true)
- - "8080:8080"
- - "443:443"
- environment:
- - "CF_API_EMAIL=nuno_ng21@hotmail.com"
- - "CF_API_KEY=7ccbb8444d58b33f44266d158501622932835"
- volumes:
- # So that Traefik can listen to the Docker events
- - "/var/run/docker.sock:/var/run/docker.sock"
- - "${SETTINGS}/Traefik:/etc/traefik"
- - "${SETTINGS}/Traefik/certs:/certs" # Certificates localtion
- restart: always
- network_mode: host
- Nextcloud:
- container_name: Nextcloud
- image: linuxserver/nextcloud
- restart: unless-stopped
- network_mode: bridge
- environment:
- - PUID=99
- - PGID=100
- ports:
- - 8081:80
- - 8282:443
- volumes:
- - "/mnt/user/appdata/containers/Nextcloud/config:/config"
- - "/mnt/user/Nextcloud:/data"
- # links:
- # - NextcloudDb
- labels:
- - "traefik.enable=true"
- - "traefik.http.routers.nextcloud-http.entrypoints=http"
- - "traefik.http.routers.nextcloud-http.rule=Host(`cloud.${DOMAIN}`)"
- - "traefik.http.routers.nextcloud-http.middlewares=https-redirect@file"
- - "traefik.http.routers.nextcloud-https.entrypoints=https"
- - "traefik.http.routers.nextcloud-https.tls=true"
- - "traefik.http.routers.nextcloud-https.rule=Host(`cloud.${DOMAIN}`)"
- - "traefik.http.routers.nextcloud-https=nextcloud"
- - "traefik.http.routers.nextcloud-https.service=nextcloud"
- - "traefik.http.services.nextcloud.loadbalancer.server.port=443"
- - "traefik.http.services.nextcloud.loadbalancer.server.scheme=https"
- - "traefik.http.services.nextcloud.loadbalancer.passhostheader=true"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement