container/Composer/nextcloud/docker-compose.yml
2023-08-18 09:33:37 +02:00

116 lines
2.8 KiB
YAML

version: '3'
services:
app:
image: nextcloud
restart: always
networks:
- caddy
- nextcloud
labels:
caddy: ${HOSTNAME}
caddy.reverse_proxy: "{{upstreams http 80}}"
caddy.0_redir: "/.well-known/carddav /remote.php/dav 301"
caddy.1_redir: "/.well-known/caldav /remote.php/dav 301"
caddy.header: "Strict-Transport-Security max-age=15552000"
caddy.tls: "internal"
volumes:
- ./data/nextcloud/www:/var/www/html
- ./default-config/preview.config.php:/var/www/html/config/preview.config.php
depends_on:
- clamav
- preview
# - db
- redis
environment:
- POSTGRES_HOST=db
- REDIS_HOST=redis
- POSTGRES_DB=nextcloud
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- NEXTCLOUD_TRUSTED_DOMAINS=${HOSTNAME}
- OVERWRITEPROTOCOL=https
- TRUSTED_PROXIES=${NEXTCLOUD_TRUSTED_PROXIES}
- APACHE_DISABLE_REWRITE_IP=1
preview:
container_name: "preview"
image: docker.io/nextcloud/aio-imaginary:latest
restart: always
networks:
- nextcloud
environment:
- PORT=9000
command: -concurrency 50 -enable-url-source
clamav:
image: "clamav/clamav:stable_base"
container_name: "clamav"
networks:
- nextcloud
volumes:
- ./data/clamav/virus_db:/var/lib/clamav/ # Virus database
restart: unless-stopped
# Does Not Work
#notify_push:
# image: icewind1991/notify_push
# restart: always
# networks:
# - nextcloud
# - caddy
# labels:
# caddy: ${HOSTNAME}
# caddy.handle_path: /push/*
# caddy.handle_path.0_reverse_proxy: "{{upstreams http 7867}}"
# depends_on:
# - db
# - redis
# - app
# volumes:
# - ./data/nextcloud/www:/var/www/html:ro
# - /etc/localtime:/etc/localtime:ro
# - /etc/timezone:/etc/timezone:ro
# environment:
# - PORT=7867
# - "NEXTCLOUD_URL=http://app" # don't go through the proxy to contact the nextcloud server
# entrypoint: ./notify_push --allow-self-signed --dump-config redis://:@redis --log-level debug /var/www/html/config/config.php
cron:
image: nextcloud
restart: always
volumes:
- ./data/nextcloud/www:/var/www/html
entrypoint: /cron.sh
depends_on:
# - db
- redis
networks:
- nextcloud
# db:
# image: postgres:alpine
# restart: always
# networks:
# - nextcloud
# environment:
# POSTGRES_USER: ${POSTGRES_USER}
# POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
# volumes:
# - ./data/db:/var/lib/postgresql/data
# - /etc/localtime:/etc/localtime:ro
redis:
image: redis:alpine
restart: always
networks:
- nextcloud
networks:
nextcloud:
internal: true
caddy:
external: true