Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit f7e0a3e

Browse files
committed
add custom cron file to nextcloud image
1 parent 28dfc38 commit f7e0a3e

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

nextcloud/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ RUN ln -sf /opt/config/nginx.conf /etc/nginx/sites-enabled/default; \
7575
RUN chown www-data /opt/config
7676

7777
ADD start.sh /usr/local/bin/run
78+
ADD cron.sh /usr/local/bin/cron.sh
7879
VOLUME /opt/storage /opt/config /opt/log /opt/static
7980
EXPOSE 9787/tcp
8081
ENTRYPOINT /usr/local/bin/run

nextcloud/cron.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env sh
2+
set -e
3+
4+
echo "Preparing environment"
5+
cd /var/www/nextcloud
6+
chmod +x ./occ
7+
8+
echo "Syncing system address books with dav"
9+
su -s /var/www/nextcloud/occ www-data dav:sync-system-addressbook
10+
11+
echo "Running cron.php"
12+
su -s /usr/bin/php www-data /var/www/nextcloud/cron.php
13+

0 commit comments

Comments
 (0)