Homelab/nextcloud.yaml
Andreas S. Turriff be8d4a098d Document Sharing
2024-06-27 17:02:27 -07:00

48 lines
2.0 KiB
YAML

nextcloud:
container_name: "nextcloud"
deploy:
labels:
traefik.enable: "true"
traefik.http.routers.nextcloud-rtr.entrypoints: websecure
traefik.http.routers.nextcloud-rtr.middlewares: "nextcloud-dav@swarm, nextcloud-index@swarm"
traefik.http.routers.nextcloud-rtr.rule: "Host(`nextcloud.your.domain`)"
traefik.http.routers.nextcloud-rtr.service: "nextcloud"
traefik.http.services.nextcloud.loadbalancer.server.port: "80"
traefik.http.middlewares.nextcloud-dav.redirectregex.regex: "https://(.*t)/.well-known/(card|cal)dav"
traefik.http.middlewares.nextcloud-dav.redirectregex.replacement: "https://$$1/remote.php/dav/"
traefik.http.middlewares.nextcloud-dav.redirectregex.permanent: "true"
traefik.http.middlewares.nextcloud-index.redirectregex.regex: "https://(.*t)/.well-known/(webfinger|nodeinfo)"
traefik.http.middlewares.nextcloud-index.redirectregex.replacement: "https://$$1/index.php/.well-known/$$2"
traefik.http.middlewares.nextcloud-index.redirectregex.permanent: "true"
replicas: 1
environment:
POSTGRES_DB: "nextcloud"
POSTGRES_USER: "nextcloud"
POSTGRES_PASSWORD_FILE: "/run/secrets/nextcloud"
POSTGRES_HOST: "postgres"
NEXTCLOUD_ADMIN_USER: "admin"
NEXTCLOUD_ADMIN_PASSWORD_FILE: "/run/secrets/nextcloud-admin"
NEXTCLOUD_TRUSTED_DOMAINS: "nextcloud.your.domain"
REDIS_HOST: "valkey"
SMTP_HOST: "your.mail.server"
SMTP_SECURE: "starttls"
SMTP_PORT: "25"
SMTP_AUTHTYPE: "PLAIN"
MAIL_FROM_ADDRESS: "nextcloud@your.domain"
MAIL_DOAIN: "your.domain"
TRUSTED_PROXIES: "10.64.0.0/16"
APACHE_DISABLE_REWRITE_IP: 1
image: "nextcloud:production"
logging:
driver: journald
networks:
- homelab
ports:
- "8080:80"
restart: on-failure
secrets:
- nextcloud
- nextcloud-admin
volumes:
- "/srv/data/docker/nextcloud/data:/var/www/html"