Comments (3)
There's no need to build a custom image. There are numerous ways of addressing this, but the simplest approach is a cron job on the host.
To extend this reply:
Most docker instances nowadays have a separated "cron" container that offloads the cron jobs since some of those are quite intensive and can block the PHP proccess for long time.
That container is basically the same NC instance that uses the cron.sh
docker entrypoint.
Instead of using the applications's container, a more "portable" solution is to use the cron container and/or it's crontab.
To do so : instead of using the main container name, use the cron container name to execute the same task, for example (copied from link above) 0 22 * * * root cd /docker/nextcloud/ && /usr/local/bin/docker-compose exec -T --user www-data cron php occ preview:pre-generate
.
Other options include mounting the file /var/spool/cron/crontabs/www-data
as volume, and putting the desired crontab entries there. With recent including of the watch parameters of Docker, you don't need to do anything additional.
And i should probably make an example of this feature, because it's quite a powerful feature that is not used around here, and it should be.
from docker.
Okay, thank you for clearing that up :)
from docker.
There's no need to build a custom image. There are numerous ways of addressing this, but the simplest approach is a cron job on the host.
E.g. nextcloud/previewgenerator#176 (comment)
from docker.
Related Issues (20)
- Easy way to change cron frequency HOT 1
- occ Warning: Failed to set memory limit to 0 bytes HOT 1
- How to protect Nextclouds datadir and html dir HOT 2
- Enhancement wish to the image HOT 1
- Cronjob do nothing HOT 2
- Error Unable to write to the “config” directory! HOT 1
- Error cd occUnable to write to the “config” directory! HOT 1
- warning: The OPcache buffer is nearly full HOT 5
- Missing python dependencies HOT 7
- Using the fpm image in a subdirectory of the proxy
- How to reindex when connected to the HOT 1
- Nextcloud fpm fails to initialize database on clean install HOT 1
- Missing image 28.0.4 HOT 1
- Cannot enable apps through UI in 28.0.4 HOT 3
- WARN[0000] docker-compose.yml: `version` is obsolete HOT 1
- docker-compose command deprecated, docker-compose up -d fails for Redis container; must first use docker-compose down HOT 1
- Add static, or immutable, image tags that always point to the same image build HOT 15
- new env for auto configuration via environment variables for ldapUserCleanupInterval HOT 1
- Error occurred while checking server setup HOT 2
- Docs and examples update, again HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.