version: "3" services: web: image: nginx depends_on: - app volumes: - ${VOLUMES_PATH}/nextcloud_html:/var/www/html:ro - $PWD/nginx.conf:/etc/nginx/nginx.conf:ro restart: unless-stopped networks: - web - nextcloud labels: - "traefik.enable=true" - "traefik.http.routers.nextcloud.rule=Host(`cloud.${DOMAIN}`)" - "traefik.http.routers.nextcloud.entrypoints=websecure" - "traefik.http.routers.nextcloud.tls.certresolver=netcup" - "traefik.http.routers.nextcloud.tls.options=intermediate@file" - "traefik.http.middlewares.nextcloudHeader.headers.customRequestHeaders.X-Forwarded-Proto=https" - "traefik.http.middlewares.nextcloudHeader.headers.stsSeconds=15552000" - "traefik.http.middlewares.nextcloudHeader.headers.stsIncludeSubdomains=true" - "traefik.http.middlewares.nextcloudHeader.headers.stsPreload=true" - "traefik.http.middlewares.nextcloudHeader.headers.forceSTSHeader=true" - "traefik.http.routers.nextcloud.middlewares=nextcloudHeader" - "docker.group=netxtcloud" app: image: nextcloud:${NC_MAIN_VERSION}-fpm volumes: - ${VOLUMES_PATH}/nextcloud_html:/var/www/html - ${VOLUMES_PATH}/nextcloud_data:/var/www/html/data restart: unless-stopped networks: - nextcloud environment: - NEXTCLOUD_TRUSTED_DOMAINS=${NEXTCLOUD_TRUSTED_DOMAINS} - MYSQL_HOST=db - MYSQL_PASSWORD=${MYSQL_PASSWORD} - MYSQL_DATABASE=${MYSQL_DATABASE} - MYSQL_USER=${MYSQL_USER} - REDIS_HOST=redis - REDIS_HOST_PASSWORD=${REDIS_HOST_PASSWORD} depends_on: - db - redis labels: - "docker.group=netxtcloud" cron: image: nextcloud:${NC_MAIN_VERSION}-fpm restart: unless-stopped networks: - nextcloud volumes: - ${VOLUMES_PATH}/nextcloud_html:/var/www/html - ${VOLUMES_PATH}/nextcloud_data:/var/www/html/data - $PWD/crontab:/var/spool/cron/crontabs/www-data:ro entrypoint: /cron.sh depends_on: - db - redis labels: - "docker.group=netxtcloud" db: image: mariadb:10 command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --skip-innodb-read-only-compressed volumes: - ${VOLUMES_PATH}/nextcloud_db:/var/lib/mysql restart: unless-stopped environment: - PUID=1000 - PGID=1000 - TZ=Europe/Berlin - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} - MYSQL_PASSWORD=${MYSQL_PASSWORD} - MYSQL_DATABASE=${MYSQL_DATABASE} - MYSQL_USER=${MYSQL_USER} networks: - nextcloud labels: - "docker.group=netxtcloud" redis: image: redis:alpine restart: unless-stopped command: redis-server --requirepass ${REDIS_HOST_PASSWORD} networks: - nextcloud volumes: - ${VOLUMES_PATH}/nextcloud_redis:/data labels: - "docker.group=netxtcloud" office: image: onlyoffice/documentserver:latest stdin_open: true tty: true restart: unless-stopped networks: - nextcloud - web expose: - '80' - '443' volumes: - ${VOLUMES_PATH}/nextcloud_documents:/var/www/onlyoffice/Data # - ${VOLUMES_PATH}/onlyoffice_log:/var/log/onlyoffice labels: - "traefik.enable=true" - "traefik.http.routers.office.rule=Host(`office.${DOMAIN}`)" - "traefik.http.routers.office.entrypoints=websecure" - "traefik.http.routers.office.tls.certresolver=netcup" - "traefik.http.routers.office.tls.options=intermediate@file" - "traefik.http.middlewares.officeHeader.headers.customRequestHeaders.X-Forwarded-Proto=https" - "traefik.http.middlewares.officeHeader.headers.stsSeconds=15552000" - "traefik.http.middlewares.officeHeader.headers.stsIncludeSubdomains=true" - "traefik.http.middlewares.officeHeader.headers.stsPreload=true" - "traefik.http.middlewares.officeHeader.headers.forceSTSHeader=true" - "traefik.http.routers.office.middlewares=officeHeader" - "docker.group=netxtcloud" networks: web: external: true nextcloud: external: false