diff --git a/.github/newsupdater-system-cron-updates.png b/.github/newsupdater-system-cron-updates.png deleted file mode 100644 index 4ea7c95..0000000 Binary files a/.github/newsupdater-system-cron-updates.png and /dev/null differ diff --git a/README.md b/README.md index a21b679..d5880cc 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,6 @@ ___ * [Nextcloud](#nextcloud) * [Cron](#cron) * [Previews generator](#previews-generator) - * [News Updater](#news-updater) * [Volumes](#volumes) * [Ports](#ports) * [Usage](#usage) @@ -39,7 +38,6 @@ ___ * [OCC command](#occ-command) * [Cron sidecar](#cron-sidecar) * [Previews generator sidecar](#previews-generator-sidecar) - * [Nextcloud News Updater](#nextcloud-news-updater) * [Email server](#email-server) * [Custom configuration](#custom-configuration) * [Redis cache](#redis-cache) @@ -56,7 +54,6 @@ ___ * [Automatic installation](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/automatic_configuration.html) * Cron task for [Nextcloud background jobs](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/background_jobs_configuration.html#cron) as a [sidecar cron container](#cron-sidecar) * Execute pre-generation of previews through [Preview Generator](https://github.com/rullzer/previewgenerator) plugin -* Handle [Nextcloud News Updater](https://github.com/nextcloud/news-updater) for [News plugin](https://apps.nextcloud.com/apps/news) through a [sidecar news updater container](#nextcloud-news-updater) * OPCache enabled to store precompiled script bytecode in shared memory * APCu installed and configured * Memcached and Redis also enabled to enhance server performance @@ -153,17 +150,6 @@ linux/s390x * `SIDECAR_PREVIEWGEN`: Set to `1` to enable sidecar previews generator mode (default `0`) * `PREVIEWGEN_PERIOD`: Periodically execute pre-generation of previews (eg. `0 * * * *`) -### News Updater - -> [!WARNING] -> Only used if you enable and run a [sidecar news updater container](#nextcloud-news-updater) - -* `SIDECAR_NEWSUPDATER`: Set to `1` to enable sidecar news updater mode (default `0`) -* `NC_NEWSUPDATER_THREADS`: How many feeds should be fetched in parallel (default `10`) -* `NC_NEWSUPDATER_TIMEOUT`: Maximum number of seconds for updating a feed (default `300`) -* `NC_NEWSUPDATER_INTERVAL`: Update interval between fetching the next round of updates in seconds (default `900`) -* `NC_NEWSUPDATER_LOGLEVEL`: Log granularity, `info` will log all urls and received data, `error` will only log errors (default `error`) - ## Volumes * `/data`: Contains config, data folders, installed user apps (not core ones), session, themes, tmp folders @@ -264,29 +250,6 @@ docker run -d --name nextcloud_previewgen \ crazymax/nextcloud:latest ``` -### Nextcloud News Updater - -If you want to enable the [Nextcloud News Updater](https://github.com/nextcloud/news-updater), -you have to run a "sidecar" container (see news_updater service in -[compose.yml](examples/compose/compose.yml) example) or run a simple container -like this: - -```bash -docker run -d --name nextcloud_news_updater \ - --env-file $(pwd)/nextcloud.env \ - -e "SIDECAR_NEWSUPDATER=1" \ - -e "NC_NEWSUPDATER_THREADS=10" \ - -e "NC_NEWSUPDATER_TIMEOUT=300" \ - -e "NC_NEWSUPDATER_INTERVAL=900" \ - -e "NC_NEWSUPDATER_LOGLEVEL=error" \ - -v "$(pwd)/data:/data" \ - crazymax/nextcloud:latest -``` - -And do not forget to disable **Use system cron for updates** in news settings: - -![Background jobs](.github/newsupdater-system-cron-updates.png) - ### Email server You can use our SMTP relay `msmtpd` service published on port `2500` and diff --git a/examples/compose/compose.yml b/examples/compose/compose.yml index d47a7cb..0adef17 100644 --- a/examples/compose/compose.yml +++ b/examples/compose/compose.yml @@ -99,31 +99,6 @@ services: - "PREVIEWGEN_PERIOD=0 * * * *" restart: always - news_updater: - image: crazymax/nextcloud:latest - container_name: nextcloud_news_updater - depends_on: - - nextcloud - volumes: - - "nextcloud:/data" - env_file: - - "./nextcloud.env" - environment: - - "TZ" - - "PUID" - - "PGID" - - "DB_TYPE=mysql" - - "DB_HOST=db" - - "DB_NAME=${MYSQL_DATABASE}" - - "DB_USER=${MYSQL_USER}" - - "DB_PASSWORD=${MYSQL_PASSWORD}" - - "SIDECAR_NEWSUPDATER=1" - - "NC_NEWSUPDATER_THREADS=10" - - "NC_NEWSUPDATER_TIMEOUT=300" - - "NC_NEWSUPDATER_INTERVAL=900" - - "NC_NEWSUPDATER_LOGLEVEL=error" - restart: always - volumes: db: nextcloud: diff --git a/examples/traefik/compose.yml b/examples/traefik/compose.yml index 3d566de..da31f31 100644 --- a/examples/traefik/compose.yml +++ b/examples/traefik/compose.yml @@ -142,31 +142,6 @@ services: - "PREVIEWGEN_PERIOD=0 * * * *" restart: always - news_updater: - image: crazymax/nextcloud:latest - container_name: nextcloud_news_updater - depends_on: - - nextcloud - volumes: - - "nextcloud:/data" - env_file: - - "./nextcloud.env" - environment: - - "TZ" - - "PUID" - - "PGID" - - "DB_TYPE=mysql" - - "DB_HOST=db" - - "DB_NAME=${MYSQL_DATABASE}" - - "DB_USER=${MYSQL_USER}" - - "DB_PASSWORD=${MYSQL_PASSWORD}" - - "SIDECAR_NEWSUPDATER=1" - - "NC_NEWSUPDATER_THREADS=10" - - "NC_NEWSUPDATER_TIMEOUT=300" - - "NC_NEWSUPDATER_INTERVAL=900" - - "NC_NEWSUPDATER_LOGLEVEL=error" - restart: always - volumes: db: nextcloud: diff --git a/rootfs/etc/cont-init.d/03-config.sh b/rootfs/etc/cont-init.d/03-config.sh index bc8c1a3..7371f53 100644 --- a/rootfs/etc/cont-init.d/03-config.sh +++ b/rootfs/etc/cont-init.d/03-config.sh @@ -74,6 +74,19 @@ DB_TIMEOUT=${DB_TIMEOUT:-60} SIDECAR_CRON=${SIDECAR_CRON:-0} SIDECAR_NEWSUPDATER=${SIDECAR_NEWSUPDATER:-0} +if [ "$SIDECAR_NEWSUPDATER" = "1" ]; then + echo >&2 "ERROR: Nextcloud News Updater sidecar support has been removed." + echo >&2 "Use the regular Nextcloud cron sidecar for News app feed updates." + exit 1 +fi + +SUBDIR=${SUBDIR:-} +if [ -n "$SUBDIR" ]; then + echo >&2 "ERROR: SUBDIR environment variable support has been removed." + echo >&2 "Configure path-prefix routing in your reverse proxy and set overwritewebroot in a custom config file." + exit 1 +fi + # Timezone echo "Setting timezone to ${TZ}..." ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime diff --git a/rootfs/etc/cont-init.d/04-svc-main.sh b/rootfs/etc/cont-init.d/04-svc-main.sh index be89e69..7f2b0c1 100644 --- a/rootfs/etc/cont-init.d/04-svc-main.sh +++ b/rootfs/etc/cont-init.d/04-svc-main.sh @@ -3,9 +3,8 @@ SIDECAR_CRON=${SIDECAR_CRON:-0} SIDECAR_PREVIEWGEN=${SIDECAR_PREVIEWGEN:-0} -SIDECAR_NEWSUPDATER=${SIDECAR_NEWSUPDATER:-0} -if [ "$SIDECAR_CRON" = "1" ] || [ "$SIDECAR_PREVIEWGEN" = "1" ] || [ "$SIDECAR_NEWSUPDATER" = "1" ]; then +if [ "$SIDECAR_CRON" = "1" ] || [ "$SIDECAR_PREVIEWGEN" = "1" ]; then exit 0 fi diff --git a/rootfs/etc/cont-init.d/07-svc-news-updater.sh b/rootfs/etc/cont-init.d/07-svc-news-updater.sh deleted file mode 100644 index a03afe4..0000000 --- a/rootfs/etc/cont-init.d/07-svc-news-updater.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/with-contenv sh -# shellcheck shell=sh - -SIDECAR_NEWSUPDATER=${SIDECAR_NEWSUPDATER:-0} -NC_NEWSUPDATER_THREADS=${NC_NEWSUPDATER_THREADS:-10} -NC_NEWSUPDATER_TIMEOUT=${NC_NEWSUPDATER_TIMEOUT:-300} -NC_NEWSUPDATER_INTERVAL=${NC_NEWSUPDATER_INTERVAL:-900} -NC_NEWSUPDATER_LOGLEVEL=${NC_NEWSUPDATER_LOGLEVEL:-error} - -# Continue only if sidecar news updater container -if [ "$SIDECAR_NEWSUPDATER" != "1" ]; then - exit 0 -fi - -echo ">>" -echo ">> Sidecar news updater container detected for Nextcloud" -echo ">>" - -# Nextcloud News Updater config file (https://github.com/nextcloud/news-updater#usage) -cat > /etc/news_updater.ini < /etc/services.d/news-updater/run <