diff --git a/README.md b/README.md index 68dbee0..8e2f6ed 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,53 @@ The commandline psql interacts with the database with 'strict' sql statements, s Here's a good link to bring you up to speed with the power of psql: [https://phili.pe/posts/postgresql-on-the-command-line/](https://phili.pe/posts/postgresql-on-the-command-line/) +### Job Scheduler for caniuse.js + +[Caniuse.js](caniuse.js) uses browserslist to query the caniuse-lite database. This is the substitute program for the now defunct Bumbleberry. Ofelia is used as an independent scheduler, and ofelia labels in [services](docker-compose.yml) establish the job requirements. + +
+ + + +``` +docker-compose.yml for Ofelia job scheduler +``` + + + +``` +# This service provides ofelia, which is a job scheduler (cron). +# +# There should be at least on job in one of the services to make this +# meaningfull to run. +# +# It is accessible everywhere since it is bound to the docker socket. +# Cron jobs can be conveniently created with labels. +# +# https://github.com/mcuadros/ofelia +# +# When you add/change a cron job simply - +# docker compose down +# docker compose up -d + +services: + ofelia: + container_name: ofelia + image: mcuadros/ofelia:latest + command: daemon --docker + restart: always + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" +``` + +
+ + ### Production and Development mode You may easily switch between the production and development environment in the .env file. diff --git a/docker-compose.yml b/docker-compose.yml index 630e99b..49a2935 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -108,11 +108,16 @@ services: - bikebikebike:/app/BikeBike - bikebikebike_bundle:/usr/local/bundle - bikebikebike_uploads:/app/BikeBike/public/uploads - build: . expose: - "3000" links: - db + labels: + ofelia.enabled: "true" # in rss2email + ofelia.job-exec.bikebike-job.schedule: "@every 6h" + ofelia.job-exec.bikebike-job.container: "bikebikebike" + ofelia.job-exec.bikebike-job.command: "/app/BikeBike/caniuse.js" + ofelia.job-exec.bikebike-job.user: "root:root" restart: always logging: driver: "json-file"