mirror of
https://github.com/jgeusebroek/docker-spotweb.git
synced 2025-08-13 16:39:19 +02:00
Add option to use cron within container
This commit is contained in:
29
README.md
29
README.md
@@ -43,26 +43,35 @@ Please NOTE that the volume is optional. Only necessary when you have special co
|
||||
|
||||
You should now be able to reach the spotweb interface on port 80.
|
||||
|
||||
### Automatic retreiving of new spots
|
||||
|
||||
To enable automatic retreiving, you need to setup a cronjob on the docker host.
|
||||
### Automatic retrieval of new spots
|
||||
To enable automatic retrieval, you need to setup a cronjob on either the docker host or within the container.
|
||||
#### Automatic retrieval of new spots on the docker host
|
||||
To enable automatic retrieval, you need to setup a cronjob on the docker host.
|
||||
|
||||
*/15 * * * * docker exec spotweb su -l www-data -s /usr/bin/php /var/www/spotweb/retrieve.php >/dev/null 2>&1
|
||||
|
||||
This example will retrieve new spots every 15 minutes.
|
||||
#### Automatic retrieval of new spots from within the container
|
||||
To enable automatic retrieval from within the container, use the `SPOTWEB_CRON_RETRIEVE` variable to specify the cron timing for retrieval. For example as additional parameter to the `docker run` command:
|
||||
|
||||
-e SPOTWEB_CRON_RETRIEVE='*/15 * * * *'
|
||||
|
||||
|
||||
### Updates
|
||||
|
||||
The container will try to auto-update the database when a newer version is released.
|
||||
|
||||
### Environment variables
|
||||
|
||||
* `TZ` The timezone the server is running in. Defaults to `Europe/Amsterdam`.
|
||||
* `SPOTWEB_DB_TYPE` Database type. Use `pdo_mysql` for MySQL.
|
||||
* `SPOTWEB_DB_HOST` The hostname / IP of the database server.
|
||||
* `SPOTWEB_DB_NAME` The database used for spotweb.
|
||||
* `SPOTWEB_DB_USER` The database server username.
|
||||
* `SPOTWEB_DB_PASS` The database server password.
|
||||
| Variable | Function |
|
||||
| --- | --- |
|
||||
| `TZ` | The timezone the server is running in. Defaults to `Europe/Amsterdam`. |
|
||||
| `SPOTWEB_DB_TYPE` | Database type. Use `pdo_mysql` for MySQL. |
|
||||
| `SPOTWEB_DB_HOST` | The hostname / IP of the database server. |
|
||||
| `SPOTWEB_DB_NAME` | The database used for spotweb. |
|
||||
| `SPOTWEB_DB_USER` | The database server username. |
|
||||
| `SPOTWEB_DB_PASS` | The database server password. |
|
||||
| `SPOTWEB_CRON_RETRIEVE` | Cron schedule for article retrieval. E.g. `'*/15 * * * *'` for every fifteen minutes.|
|
||||
| `SPOTWEB_CRON_CACHE_CHECK` | Cron schedule for article cache sanity check. E.g. `'10 */1 * * *'` for 10 minutes after every hour. |
|
||||
|
||||
## License
|
||||
|
||||
|
Reference in New Issue
Block a user