Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .github/newsupdater-system-cron-updates.png
Binary file not shown.
37 changes: 0 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ ___
* [Nextcloud](#nextcloud)
* [Cron](#cron)
* [Previews generator](#previews-generator)
* [News Updater](#news-updater)
* [Volumes](#volumes)
* [Ports](#ports)
* [Usage](#usage)
Expand All @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
25 changes: 0 additions & 25 deletions examples/compose/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
25 changes: 0 additions & 25 deletions examples/traefik/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
13 changes: 13 additions & 0 deletions rootfs/etc/cont-init.d/03-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions rootfs/etc/cont-init.d/04-svc-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
38 changes: 0 additions & 38 deletions rootfs/etc/cont-init.d/07-svc-news-updater.sh

This file was deleted.

4 changes: 1 addition & 3 deletions rootfs/usr/local/bin/healthcheck
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/bin/sh
set -e

if [ "$SIDECAR_NEWSUPDATER" = "1" ]; then
pgrep -f "/usr/bin/nextcloud-news-updater -c /etc/news_updater.ini"
elif [ "$SIDECAR_CRON" = "1" ] || [ "$SIDECAR_PREVIEWGEN" = "1" ]; then
if [ "$SIDECAR_CRON" = "1" ] || [ "$SIDECAR_PREVIEWGEN" = "1" ]; then
pgrep -f "busybox crond -f -L /dev/stdout"
else
curl --fail http://127.0.0.1:12345/ping || exit 1
Expand Down
25 changes: 0 additions & 25 deletions test/mysql/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,31 +89,6 @@ services:
- "PREVIEWGEN_PERIOD=0 * * * *"
restart: always

news_updater:
image: ${NEXTCLOUD_IMAGE:-crazymax/nextcloud}
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:
25 changes: 0 additions & 25 deletions test/pgsql/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,31 +88,6 @@ services:
- "PREVIEWGEN_PERIOD=0 * * * *"
restart: always

news_updater:
image: ${NEXTCLOUD_IMAGE:-crazymax/nextcloud}
container_name: nextcloud_news_updater
depends_on:
- nextcloud
volumes:
- "nextcloud:/data"
env_file:
- "./nextcloud.env"
environment:
- "TZ"
- "PUID"
- "PGID"
- "DB_TYPE=pgsql"
- "DB_HOST=db"
- "DB_NAME=${POSTGRES_DB}"
- "DB_USER=${POSTGRES_USER}"
- "DB_PASSWORD=${POSTGRES_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:
21 changes: 0 additions & 21 deletions test/sqlite/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,6 @@ services:
- "PREVIEWGEN_PERIOD=0 * * * *"
restart: always

news_updater:
image: ${NEXTCLOUD_IMAGE:-crazymax/nextcloud}
container_name: nextcloud_news_updater
depends_on:
- nextcloud
volumes:
- "nextcloud:/data"
env_file:
- "./nextcloud.env"
environment:
- "TZ"
- "PUID"
- "PGID"
- "DB_TYPE=sqlite"
- "SIDECAR_NEWSUPDATER=1"
- "NC_NEWSUPDATER_THREADS=10"
- "NC_NEWSUPDATER_TIMEOUT=300"
- "NC_NEWSUPDATER_INTERVAL=900"
- "NC_NEWSUPDATER_LOGLEVEL=error"
restart: always

volumes:
db:
nextcloud:
4 changes: 0 additions & 4 deletions v32.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,13 @@ RUN apk --update --no-cache add \
php85-zip \
php85-zlib \
postgresql-client \
python3 \
py3-pip \
tzdata \
util-linux \
&& mv /etc/php85 /etc/php && ln -s /etc/php /etc/php85 \
&& mv /etc/init.d/php-fpm85 /etc/init.d/php-fpm && ln -s /etc/init.d/php-fpm /etc/init.d/php-fpm85 \
&& mv /etc/logrotate.d/php-fpm85 /etc/logrotate.d/php-fpm && ln -s /etc/logrotate.d/php-fpm /etc/logrotate.d/php-fpm85 \
&& mv /var/log/php85 /var/log/php && ln -s /var/log/php /var/log/php85 \
&& ln -s /usr/sbin/php-fpm85 /usr/sbin/php-fpm \
&& pip3 install --upgrade --break-system-packages pip \
&& pip3 install --break-system-packages nextcloud_news_updater \
&& cd /tmp \
&& rm -rf /tmp/* /var/www/*

Expand Down
4 changes: 0 additions & 4 deletions v33.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,13 @@ RUN apk --update --no-cache add \
php85-zip \
php85-zlib \
postgresql-client \
python3 \
py3-pip \
tzdata \
util-linux \
&& mv /etc/php85 /etc/php && ln -s /etc/php /etc/php85 \
&& mv /etc/init.d/php-fpm85 /etc/init.d/php-fpm && ln -s /etc/init.d/php-fpm /etc/init.d/php-fpm85 \
&& mv /etc/logrotate.d/php-fpm85 /etc/logrotate.d/php-fpm && ln -s /etc/logrotate.d/php-fpm /etc/logrotate.d/php-fpm85 \
&& mv /var/log/php85 /var/log/php && ln -s /var/log/php /var/log/php85 \
&& ln -s /usr/sbin/php-fpm85 /usr/sbin/php-fpm \
&& pip3 install --upgrade --break-system-packages pip \
&& pip3 install --break-system-packages nextcloud_news_updater \
&& cd /tmp \
&& rm -rf /tmp/* /var/www/*

Expand Down
4 changes: 0 additions & 4 deletions v34.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,13 @@ RUN apk --update --no-cache add \
php85-zip \
php85-zlib \
postgresql-client \
python3 \
py3-pip \
tzdata \
util-linux \
&& mv /etc/php85 /etc/php && ln -s /etc/php /etc/php85 \
&& mv /etc/init.d/php-fpm85 /etc/init.d/php-fpm && ln -s /etc/init.d/php-fpm /etc/init.d/php-fpm85 \
&& mv /etc/logrotate.d/php-fpm85 /etc/logrotate.d/php-fpm && ln -s /etc/logrotate.d/php-fpm /etc/logrotate.d/php-fpm85 \
&& mv /var/log/php85 /var/log/php && ln -s /var/log/php /var/log/php85 \
&& ln -s /usr/sbin/php-fpm85 /usr/sbin/php-fpm \
&& pip3 install --upgrade --break-system-packages pip \
&& pip3 install --break-system-packages nextcloud_news_updater \
&& cd /tmp \
&& rm -rf /tmp/* /var/www/*

Expand Down