This application works as a one-shot container, the image for which you can download from Docker Hub.
docker pull alphadock/workloggerSince the image requires some information to be setup through local files and environment variables, you will need to specify some of those by creating a container:
docker create \
-v /path/to/your/application/folder:/app/worklogger_home \
-e TZ=America/Toronto \
--name worklogger \
alphadock/workloggerYou can replace the following elements:
America/Torontowith your timezone of preference, with any of the valid timezones from the tz database.--name workloggercan be any name that you want to use to identify this container/path/to/your/application/folderto the Worklogger Home folder, a directory that should contain the following files:configuration.jsonwith the application configuration- If using local storage for credential files (instead of S3), ensure the Google Input configuration files are present in here as well.
- Notice that all output files will be written to this folder too.
If you don't want to do all of it manually, you can take this docker-compose file and edit it:
services:
worklogger:
image: alphadock/worklogger:latest
volumes:
- ./worklogger_home:/app/worklogger_home
env:
- TZ=America/TorontoFinally, you can setup a cronjob that will run this command with the periodicity that you'd like:
docker start -a worklogger
# or...
docker-compose run workloggerWhile having the containers detached is a common practice, it will prevent your cronjob from receiving the output of the operation, so I'd suggest leaving it attached.