version: "3" services: nextcloud: image: nextcloud:apache container_name: nextcloud restart: always ports: - "1869:80" networks: - nextcloud - proxy volumes: - /docker/nextcloud/nextcloud:/var/www/html - /mnt/Storage/Nextcloud:/var/www/html/data - /mnt/Storage/Syncthing:/Syncthing - /mnt/Storage/Media/Music:/Music - /etc/localtime:/etc/localtime:ro environment: - TZ=Europe/Helsinki - MYSQL_HOST=mariadb-nextcloud - REDIS_HOST=redis depends_on: - mariadb-nextcloud - redis labels: - "traefik.enable=true" - "traefik.http.routers.nextcloud-redirect.entrypoints=http" - "traefik.http.routers.nextcloud-redirect.rule=Host(`cloud.reekynet.com`)" - "traefik.http.middlewares.http2https.redirectscheme.scheme=https" - "traefik.http.routers.nextcloud-redirect.middlewares=http2https" - "traefik.http.routers.nextcloud.entrypoints=https" - "traefik.http.routers.nextcloud.rule=Host(`cloud.reekynet.com`)" - "traefik.http.routers.nextcloud.tls=true" - "traefik.http.routers.nextcloud.tls.certresolver=http" - "traefik.http.routers.nextcloud.service=nextcloud" - "traefik.docker.network=proxy" - "traefik.http.services.nextcloud.loadbalancer.server.port=80" mariadb-nextcloud: container_name: mariadb-nextcloud image: mariadb command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW restart: always networks: - nextcloud environment: - TZ=Europe/Helsinki - MYSQL_ROOT_PASSWORD=nextcloud volumes: - /docker/nextcloud/mariadb:/var/lib/mysql - /etc/localtime:/etc/localtime:ro redis: image: redis:alpine container_name: redis networks: - nextcloud restart: always cron: image: nextcloud:apache container_name: cron restart: always volumes: - /docker/nextcloud/nextcloud:/var/www/html entrypoint: /cron.sh depends_on: - mariadb-nextcloud - redis networks: nextcloud: external: false proxy: external: true